Modes (Unix) - String Mode Examples

String Mode Examples

For example, the following command would be used to add the read and write permissions to the user and group classes of a file or directory named sample:

$ chmod ug+rw sample $ ls -ld sample drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample

This command removes all permissions, allowing no one to read, write, or execute the file named sample.

$ chmod a-rwx sample $ ls -l sample ---------- 2 unixguy unixguy 96 Dec 8 12:53 sample

The following command changes the permissions for the user and the group to read and execute only (no write permission) on sample.

Sample file permissions before command $ ls -ld sample drw-rw---- 2 unixguy unixguy 96 Dec 8 12:53 sample $ chmod ug=rx sample $ ls -ld sample dr-xr-x--- 2 unixguy unixguy 96 Dec 8 12:53 sample

Read more about this topic:  Modes (Unix)

Famous quotes containing the words string, mode and/or examples:

    Amongst the learned the lawyers claim first place, the most self-satisfied class of people, as they roll their rock of Sisyphus and string together six hundred laws in the same breath, no matter whether relevant or not, piling up opinion on opinion and gloss on gloss to make their profession seem the most difficult of all. Anything which causes trouble has special merit in their eyes.
    Desiderius Erasmus (c. 1466–1536)

    Almost any mode of observation will be successful at last, for what is most wanted is method.
    Henry David Thoreau (1817–1862)

    It is hardly to be believed how spiritual reflections when mixed with a little physics can hold people’s attention and give them a livelier idea of God than do the often ill-applied examples of his wrath.
    —G.C. (Georg Christoph)