Reputation: 3097
I want to change ownership of all of my folders, so I use this command:
chown -R root: *
Now I want to say change all folders except ./test
folder.
Is it possible ?
Upvotes: 0
Views: 810
Reputation: 123608
Set the extglob
option and then exclude the desired folder:
shopt -s extglob
chown -R root: !(test)
Upvotes: 1