Ls - Sample Usage

Sample Usage

The following example demonstrates the output of the ls command given two different arguments:

$ pwd /home/fred $ ls -l drwxr--r-- 1 fred editors 4096 drafts -rw-r--r-- 1 fred editors 30405 edition-32 -r-xr-xr-x 1 fred fred 8460 edit $ ls -F drafts/ edition-32 edit*(x)

In this example, the user fred has a directory named drafts, a regular file called edition-32, and an executable named edit in his home directory. ls uses unix file permission notation to indicate which users or groups are allowed to access each file or directory.

drwxr--r-- 1 fred editors 4096 Mar 1 2007 drafts

This means that the letters behind the file descriptor (d), which indicates a folder or 'directory', list three characters to indicate permissions for the current user (rwx), then the group to which the file belongs (r--), and the rights of others (r--).

'drafts' is a directory (d), the user has the right to read (r) write (w) and execute (x): rwx, group members have (r--), meaning read only, and others have (r--), meaning read only access. See unix file permission notation for a more detailed description.

Read more about this topic:  Ls

Famous quotes containing the words sample and/or usage:

    The present war having so long cut off all communication with Great-Britain, we are not able to make a fair estimate of the state of science in that country. The spirit in which she wages war is the only sample before our eyes, and that does not seem the legitimate offspring either of science or of civilization.
    Thomas Jefferson (1743–1826)

    ...Often the accurate answer to a usage question begins, “It depends.” And what it depends on most often is where you are, who you are, who your listeners or readers are, and what your purpose in speaking or writing is.
    Kenneth G. Wilson (b. 1923)