Greg Pittman

Authored Comments

Numbering involves assigning 4 to r, 2 to w, and 1 to x. So a file such as the one above could be indicated for chmod as 764. If I typed

chmod 664 example.txt

ls -l would then show it as -rw-rw-r-- example.txt

Also note that the mv command works for directories too.

I generally prefer to use the numbering system for the chmod command. This way I can precisely set permissions with one step. If you list files with ls -l, they will show up like

-rwxrw-r-- example.txt

The first dash shows this is a file, not a directory (you would see a 'd' instead if it were a directory). After that you have 3 groups of rwx permissions (read, write, execute). The first 3 pertain to the owner of the file, the second 3 to his group, and the third to any user.