Exclude Files or Directories When Performing a Chown

From Bonus Bits
Jump to: navigation, search


This article gives the some examples of how you can change ownership of files and directories while excluding specific files and directories. This can be useful if there are symlinks or mounts in the directory you don't want to touch or spend the time waiting for.


ls | grep -v itemnametoskip | xargs -n1 sudo chown -R apache.apache

Related Articles