[opensuse] How use chmod selectively on files and directories
Hi how can I use chmod recursively on a directory tree so that directories get execute-option but files don't? regards -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Am Samstag, 4. Juli 2009 schrieb Andreas:
Hi
how can I use chmod recursively on a directory tree so that directories get execute-option but files don't?
-R option for recursice and the X mode? man chmod: [...] The letters rwxXst select file mode bits for the affected users: [...] execute/search only if the file is a directory or already has execute permission for some user (X), [...] HTH Jan -- You can't expect to hit the jackpot if you don't put a few nickels in the machine. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi! Am Samstag 04 Juli 2009 schrieb Andreas:
how can I use chmod recursively on a directory tree so that directories get execute-option but files don't?
find . -d -exec chmod ... Regards, Matthias -- Matthias Bach www.marix.org „Der einzige Weg, die Grenzen des Möglichen zu finden, ist ein klein wenig über diese hinaus in das Unmögliche vorzustoßen.“ - Arthur C. Clarke
On Sat, 4 Jul 2009 14:03:53 +0200, you wrote: Dann schon, weil's nicht für jedes einzelne Vezeichnis chmod aufruft: find . -d -print0|xargs -0 chmod ugo+x Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Sat, 4 Jul 2009 14:03:53 +0200, you wrote: [Now in english] Then better use: find . -d -print0 |xargs -0 chmod ugo+x because it won't call chmod for every single directory found. Philipp -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Hi! Am Samstag 04 Juli 2009 schrieb Philipp Thomas:
Then better use:
find . -d -print0 |xargs -0 chmod ugo+x
because it won't call chmod for every single directory found.
That's correct. Thanks for the clarification. I was kindof caught between doors and just wanted to throw a pointer into the right direction. Regards, Matthias -- Matthias Bach www.marix.org „Der einzige Weg, die Grenzen des Möglichen zu finden, ist ein klein wenig über diese hinaus in das Unmögliche vorzustoßen.“ - Arthur C. Clarke
participants (4)
-
Andreas
-
Jan Ritzerfeld
-
Matthias Bach
-
Philipp Thomas