chmod operation on directories / files

2008-05-07 Thread Zbigniew Szalbot
Hello, How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning everything 644 permissions, directories including. Many thanks! -- Zbigniew Szalbot www.lc-words.com smime.p7s Description: S/MIME Cryptographic Signature

Re: chmod operation on directories / files

2008-05-07 Thread Julien Cigar
sorry.. | xargs chmod instead of | xargs | chmod ... On Wed, 2008-05-07 at 16:14 +0200, Julien Cigar wrote: find your_dir -type (f|d) | xargs | chmod ... or find your_dir -type (f|d) -exec chmod {} \; On Wed, 2008-05-07 at 13:56 +0200, Zbigniew Szalbot wrote: Hello, How do I

Re: chmod operation on directories / files

2008-05-07 Thread Julien Cigar
find your_dir -type (f|d) | xargs | chmod ... or find your_dir -type (f|d) -exec chmod {} \; On Wed, 2008-05-07 at 13:56 +0200, Zbigniew Szalbot wrote: Hello, How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning

Re: chmod operation on directories / files

2008-05-07 Thread Zbigniew Szalbot
Hello, Baptiste Grenier pisze: Using find(1), you can try something like this: For files: find /plop -type f -exec chmod 644 '{}' \; For dirs: find /plop -type d -exec chmod 755 '{}' \; I have recieved many helpful replies. Thank you all. The above did the trick for me. I have saved

Re: chmod operation on directories / files

2008-05-07 Thread Baptiste Grenier
Le 07/05/08 à 14:00, Zbigniew Szalbot téléscripta : Hello, Hi, How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning everything 644 permissions, directories including. Using find(1), you can try something like

Re: chmod operation on directories / files

2008-05-07 Thread Jonathan McKeown
On Wednesday 07 May 2008 13:56, Zbigniew Szalbot wrote: How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning everything 644 permissions, directories including. Use the symbolic form for permissions and use X, which is

Re: chmod operation on directories / files

2008-05-07 Thread Gordon devel
On Wed, May 07, 2008 at 01:56:42PM +0200, Zbigniew Szalbot wrote: How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning everything 644 permissions, directories including. How about? find . -type d -exec chmod 755

Re: chmod operation on directories / files

2008-05-07 Thread Valerio Daelli
Try with find -type d -exec chmod 755 {} \; find -type f -exec chmod 644 {} \; Bye Valerio Daelli On Wed, May 7, 2008 at 1:56 PM, Zbigniew Szalbot [EMAIL PROTECTED] wrote: Hello, How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the

RE: chmod operation on directories / files

2008-05-07 Thread Catalin Miclaus
-Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zbigniew Szalbot Sent: Wednesday, May 07, 2008 12:57 PM To: freebsd-questions@freebsd.org Subject: chmod operation on directories / files Hello, How do I chmod separately files and directories? If I use

Re: chmod operation on directories / files

2008-05-07 Thread Yi Wang
: -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Zbigniew Szalbot Sent: Wednesday, May 07, 2008 12:57 PM To: freebsd-questions@freebsd.org Subject: chmod operation on directories / files Hello, How do I chmod separately files and directories

Re: chmod operation on directories / files

2008-05-07 Thread RW
On Wed, 7 May 2008 07:37:47 -0500 Gordon devel [EMAIL PROTECTED] wrote: On Wed, May 07, 2008 at 01:56:42PM +0200, Zbigniew Szalbot wrote: How do I chmod separately files and directories? If I use chmod -R 644 then it will go through all the subdirectories assigning everything 644

Re: chmod operation on directories / files

2008-05-07 Thread RW
On Wed, 07 May 2008 16:17:12 +0200 Julien Cigar [EMAIL PROTECTED] wrote: sorry.. | xargs chmod instead of | xargs | chmod ... It will still fail on a directory name that contains a space (this is a difference between Gnu and BSD). You need: find ... -print0 | xargs -0