Is it possible to create a script to save and restore permissions?

前端 未结 13 1557
逝去的感伤
逝去的感伤 2021-01-30 04:29

I am using a linux system and need to experiment with some permissions on a set of nested files and directories. I wonder if there is not some way to save the permissions for t

13条回答
  •  渐次进展
    2021-01-30 04:54

    save: find . -type f |xargs ls -la| awk '{print "chmod "$1" "$NF}'>./filesPermissions.sh

    restore: sh ./filesPermissions.sh

提交回复
热议问题