我要排除一些大内容目录
我用它来 chown 目录
chown -R admin /home/admin/web/public_html
反正有没有排除html下的子目录
喜欢:
chown -R admin exclude=/home/admin/web/public_html/content /home/admin/web/public_html
类似的东西
谢谢
最佳答案
您可以使用带有循环的脚本,类似于:
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
关于linux - chown -R 排除某些目录,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/49365866/