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:

    All that a city will ever allow you is an angle on it—an oblique, indirect sample of what it contains, or what passes through it; a point of view.
    Peter Conrad (b. 1948)

    ...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)