Mark Brand wrote: > Moreover, there doesn't seem to be any way of invoking chown so that it > operates recursively on a directory tree but ignores (doesn't follow) > symbolic links.
Personally I would use find/xargs. Like this: > haydn:~ # mkdir sandbox > haydn:~ # cd sandbox/ > haydn:~/sandbox # mkdir -p a/aa/aaa > haydn:~/sandbox # touch foo > haydn:~/sandbox # mkdir b > haydn:~/sandbox # cd a/aa/aaa/ > haydn:~/sandbox/a/aa/aaa # ln -s ../../../foo foo > haydn:~/sandbox/a/aa/aaa # ln -s ../../../b b > haydn:~/sandbox/a/aa/aaa # cd ../../.. > haydn:~/sandbox # ls -l > total 2 > drwxr-xr-x 4 root root 120 Mar 9 10:03 . > drwx------ 37 root root 2304 Mar 9 10:02 .. > drwxr-xr-x 3 root root 72 Mar 9 10:03 a > drwxr-xr-x 2 root root 48 Mar 9 10:03 b > -rw-r--r-- 1 root root 0 Mar 9 10:03 foo > haydn:~/sandbox # chown -R nobody:users a find a -print0 | xargs -r0 chown nobody:users Does that work as you desire? Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
