create new tag
, view all tags
See BLT.

ls: This is the command to " l i s t" the files in your directory. It is comparible to the DOS dir command.

By now you should have used the command at least a few times. There are lots of switches to make it more useful. A few more common ones are listed below:

  • ls lists the file names in across the screen
  • -l is the " l ong" version. It shows type, permission, etc
  • -a shows " a ll" the files, including the hidden ones.
  • -al shows all the files in a long version list.
  • --color or --color=yes toggles bash to show the list in colors , a different color each for files, directories, links, etc.
  • --color=no toggles bash to show the list in black and white.
  • Note that the color command is sticky.

The following information isn't specific to ls , but it is useful to know about.

ls can have its output redirected. This is done with a > sign. You can output the directory listing to a text file:

ls > filename

If the directoy listing is too long to see on one screen you can display one screen at a time with the " | more " switch.

Shift+PageUp will allow you to scroll upward. Shift+PageDown will allow you to scroll downward


  • GrantFraser - 15 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Topic revision: r1 - 2002-01-16 - GrantFraser
  • Learn about TWiki  
  • Download TWiki
This site is powered by the TWiki collaboration platform Powered by PerlCopyright 1999-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding WikiLearn? WebBottomBar">Send feedback
See TWiki's New Look