Date: Thu, 9 Sep 2010 13:24:50 -0400 From: Aryeh Friedman <aryeh.friedman@gmail.com> To: FreeBSD Mailing List <freebsd-questions@freebsd.org> Subject: how to recursively symlink every file in a dir Message-ID: <AANLkTimR9QehTjUrm%2B0CqRVAx=QHkgcfpygrJJfkhbmp@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
I want to make it so every file is a seperate symlink in dir2 if and only if it is a regular file (not a dir) in dir1... the reason is if the file is unchanged then use symlink but I can rm the symlink and replace it with a non-symlink: To show the problem I am attempting to solve: foo: (owned by fred) arf: ack in barney's account: ln -s ~foo/ foo rm foo/arf/ack # Permissioin denied ... it should nuke the symlink and let me then do something like "touch foo/arf/ack Note there are over 500 files upto 5 dirs deep in the dir I want to symlink from.... the final application is our version control system (devel/aegis) keeps seperate repos for different source code projects (for obvious reasons) and we want to make it so in normal operation we can symlink tne source tree from one project into an other but if we want to make a local modificiation to the "foreign" source tree all we have do is (sorry for the aegis commands but I think the idea is clear): rm src/foreign/foo.c aenf src/foreign/foo.c cp ~aegis/foreign/baselins/src/forgein.c vi src/foreign/foo.c # to make local modifications And before someone suggests a ar library we purposely *DO NOT* want the modified libs to be installed until later
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTimR9QehTjUrm%2B0CqRVAx=QHkgcfpygrJJfkhbmp>