Lesson 6 | Directory listings |
Objective | Match the ls Command Options to Descriptions of their Purpose. |
ls
command extensively.
A number of other useful options to use with ls
are listed in the table below:
Option | Purpose |
-R |
Generate recursive listing. |
-F |
Label files in listing with /, *, @ for directories, executables, and symbolic links. |
-t |
List files in order of modification time. |
-u |
List files in order of access time. |
-g |
Include information on group of files. |
-a |
Include hidden files. |
-l |
Generate long format listing. |
ls [options] [names]If no names are given, list the files in the current directory. With one or more names, list files contained in a directory name or that match a file name.
Command | Purpose |
-a, --all | List all files, including the normally hidden . files. |
-A, --almost-all | Like -a, but exclude . and .. (the current and parent directories). |
-b, --escape | Show nonprinting characters in octal. |
-c, --time-ctime, --time=status | List files by inode modification time. |
-C, --format=vertical | List files in columns (the default format, when displaying to a terminal device). |