Reputation: 380
I want to exclude some large content directory
I'm Using it to chown Directory
chown -R admin /home/admin/web/public_html
is there anyway to exclude a subdirectory under html
Like:
chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html
Something like that
Thanks
Upvotes: 1
Views: 2601
Reputation: 347
You can to use a script with a loop, similar to this:
path_list=$(find /home/admin/web/public_html)
for path in $path_list
do
if test $path != "/home/admin/web/public_html/content"
then
chown -R admin $path
fi
done
Upvotes: 1