Listing Files and Directories

The ls command shows you the contents of a directory. By default, it only shows you part of the story. You can get a more descriptive listing by passing some additional arguments to the command. In your home directory, execute the command ls -l. (That’s a lowercase L.)

 $ ​​ls​​ ​​-l
 total 36
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Desktop
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Documents
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Downloads
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Music
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Pictures
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Public
 drwxr-xr-x 2 brian brian 4096 Mar 2 15:48 sharptools
 drwxr-xr-x 2 brian brian 4096 Mar 2 11:59 Templates
 drwxr-xr-x ...

Get Small, Sharp Software Tools now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.