Results 1 to 4 of 4
Hello,
I just want to confirm that -> find . -type d -exec chmod 755 {} \; will chmod all directories current and lower will now be 755.
Say directory ...
- 11-03-2011 #1Just Joined!
- Join Date
- Sep 2007
- Posts
- 27
Want To Confirm Chmod All Directories
Hello,
I just want to confirm that -> find . -type d -exec chmod 755 {} \; will chmod all directories current and lower will now be 755.
Say directory scheme is,
Home/Dir1/Dir2/Dir3/Dir4/Dir5, and I am in dircectory DIR3. If I run the statement above in Dir3, it should mean all directories DIR3/DIR4/DIR5 are all now 755 and DIR1 and DIR2 stay as before.
Thanks JR
- 11-03-2011 #2
If you just run:
It will show you everything that will be matched when you actually run the -exec command.Code:find . -type d
DISTRO=Arch
Registered Linux User #388732
- 11-03-2011 #3Just Joined!
- Join Date
- Sep 2007
- Posts
- 27
Hello,
Thank you for the reply. But just want to confirm the directories it is going to chmod.
JR
- 11-04-2011 #4Linux Guru
- Join Date
- May 2011
- Posts
- 1,838
What Cabhan is telling you is that everything returned by find . -type d will have performed on them whatever command you pass with the -exec arg in find . -type d -exec command {} \;
in short, yes.


Reply With Quote