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 true if any of the 
execute bits is currently set, or if the argument is a directory.

chmod -R =r,u+w,+X .

(set read for all, add user write, add all execute bits if required) should 
give you 644 on files, 755 on directories and executables.

Jonathan
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to