Linux and UNIX Systems Configuration Help, How To, Tutorial and Basic Information

  • Decrease font size
  • Default font size
  • Increase font size
  • default color
  • red color
  • green color
ls PDF Print E-mail
Monday, 08 February 2010 08:34
AddThis Social Bookmark Button

Command ls

Prints the contents of the directory.

Syntax

ls [options] [directory-names]

Options

-a displays all files, including those with names starting with a dot (.).
-b displays unprintable characters in file names in octal.
-c sort the files by the time of their creation.
-d displays directories as well as regular files (not display their contents).
-f displays the contents of directory without sorting (just as it is stored on disk).
-i displays information about the inode "inode".
-l displays a list of files in a long format with detailed information.
-p adds the file name symbol showing its type.
-r sorts the contents in reverse alphabetical order.
-s displays next to the names of files to the size (in kilobytes).
-t sorts the contents on the timestamp files.
-1 Displays a list of file names in one column.
-R Recursively display the files in all subdirectories.

The ls command displays the contents of the specified directory. If the directory name is omitted, ls displays contents of current directory. By default, ls does not display files with names which begin with a dot (.) to see all the files, type ls -a. Detailed information about the files (including size, ownership and group ownership and right to read - Recording - performance) can be obtained using the command ls -l.

 

Add comment


Security code
Refresh

Latest News

Friends

Thanks David Ayvazyan for provided useful information and discussions.
www.gnu.am (Armenian Translation)