

0·
13 days agoYou can actually do chmod +777,u+rwx,go-w foo to make the logic easier if you want to force a starting assumption.


You can actually do chmod +777,u+rwx,go-w foo to make the logic easier if you want to force a starting assumption.


Careful: chmod -X also looks for any existing exec bits:
$ umask 0
$ >foo >bar
$ ls -al foo bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 foo
$ chmod o+x foo
$ ls -al foo bar
-rw-rw-rw- 1 user group 0 Sep 10 00:00 bar
-rw-rw-rwx 1 user group 0 Sep 10 00:00 foo
$ chmod u=rwX,g=rX,o=rX foo bar
$ ls -al foo bar
-rw-r--r-- 1 user group 0 Sep 10 00:00 bar
-rwxr-xr-x 1 user group 0 Sep 10 00:00 foo
One option is to use
less -Rto see the pretty colors.The boring option is to use
ls --color=neverand be sad.