I want to write an alias that does the following:
private () {
chmod go-rwx "$@"
}
I believe this does exactly what you want. It defines a shell function using Posix syntax that works with every Posix shell, not just bash. It works on any number of files.
It removes rwx permission bits from only the group and others, leaving the user permissions as whatever they previously were.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.