hi is there any way to change all files/directories permission except one single directory in a 'single linux command'? Thanks.
Tell me more
×
Super User is a question and answer site for
computer enthusiasts and power users. It's 100% free, no registration required.
migrated from stackoverflow.com Sep 17 '12 at 20:05
|
Assuming that you wish to set the permission bit 755 recursively for the contents of the folders in your current working directory, apart from the contents of the folder called "nameOfFolderToBeExcluded":
|
|||
|
|
|
You can use Assuming you need to exclude directory
Tested
The file permissions for file |
|||
|
|
|
What shell? If you're running bash (likely if you're on Linux), you can check out extglob, which gives you more options for globbing, including the "negative glob"
|
||||
|
|
grep -v "directory to exclude"– user1655481 Sep 17 '12 at 18:03