Hi guys..
How to
chmod Recursively all directories to 755 and files to 646 at once.
thanks
Hi guys..
How to
chmod Recursively all directories to 755 and files to 646 at once.
thanks
shebangs
At once not possible but one by one you can set it up:
type -d == DirsCode:find -type d -print0 | xargs -0 -I {} chmod 755 {} find -type f -print0 | xargs -0 -I {} chmod 646 {}
type -f == Files
All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]
vamsi (30th March 2010)
bash 4.0
using findCode:shopt -s globstar for file in ** do if [ -d "$file" ]; then chmod 755 "$file" elif [ -f "$file" ];then chmod 646 "$file" fi done
Code:find /path | while read -r FILE do [ -d "$FILE" ] && chmod 755 "$FILE" [ -f "$FILE" ] && chmod 646 "$FILE" done
Last edited by ghostdog74; 30th March 2010 at 06:14 PM.
vamsi (30th March 2010)
All [Solved] threads are closed by mods / admin to avoid spam issues. See Howto mark a thread as [Solved]
Hi , how about
Code:find . -type f -exec chmod 644 {} \;
shebangs
There are currently 1 users browsing this thread. (0 members and 1 guests)