We relaunched the TWiki.org project with an expanded TWiki charter, and we invite you to participate! The TWiki.org Code of Conduct agreement took effect on 27 Oct 2008. We ask existing twiki.org users to opt-in. You need to opt-in to participate in the Blog, Codev, Plugins and TWiki webs. -- PeterThoeny - 27 Oct 2008
You are here: TWiki> Wikilearn Web>BltTermsToDefine>Ls (16 Jan 2002, GrantFraser)
Tags:
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

Contributors

  • GrantFraser - 15 Jan 2002
  • <If you edit this page, add your name here, move this to the next line>
Topic revision: r1 - 16 Jan 2002 - 05:40:40 - GrantFraser
 
TWIKI.NET
Copyright © 1999-2008 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback
See TWiki's New Look