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:

    A culture may be conceived as a network of beliefs and purposes in which any string in the net pulls and is pulled by the others, thus perpetually changing the configuration of the whole. If the cultural element called morals takes on a new shape, we must ask what other strings have pulled it out of line. It cannot be one solitary string, nor even the strings nearby, for the network is three-dimensional at least.
    Jacques Barzun (b. 1907)

    If Thought is capable of being classed with Electricity, or Will with chemical affinity, as a mode of motion, it seems necessary to fall at once under the second law of thermodynamics as one of the energies which most easily degrades itself, and, if not carefully guarded, returns bodily to the cheaper form called Heat. Of all possible theories, this is likely to prove the most fatal to Professors of History.
    Henry Brooks Adams (1838–1918)

    In the examples that I here bring in of what I have [read], heard, done or said, I have refrained from daring to alter even the smallest and most indifferent circumstances. My conscience falsifies not an iota; for my knowledge I cannot answer.
    Michel de Montaigne (1533–1592)