On Saturday 14 June 2008 23:12:05 Rodney Baker wrote:
On Sun, 15 Jun 2008 05:45:58 Rikard Johnels wrote:
Hello all!
I am (unsuccessfully) trying to arrange the usermod and permissions on some 5.000 folders and 20.000 files. (My music collection) I cant for my life compose a script that: a. Will set all directories to chmod 755 b, will set all regular files to perm 644
To change all the subdirectories of the current working directory:
find -type d -print0 | xargs -0 chmod 0755
This will find all directories under the current directory and set their perms to 0755.
Similarly with the files: find -type f -print0 | xargs -0 chmod 0644.
I think the following commands will do: find . -type f -exec chmod 644 \{\} \; find . -type d -exec chmod 755 \{\} \; No need to use xargs. Also note the use of "." to indicate the current directory, which the previous poster forgot. -- Erwin Lam (erwinlam@dds.nl) -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org