3 - Weber State University
3 - Weber State University
3 - Weber State University
Create successful ePaper yourself
Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.
98 Chapter 3 Exploring Linux Filesystems<br />
Option Description<br />
-a<br />
--all<br />
Lists all filenames<br />
-A<br />
--almost-all<br />
-C<br />
--color=n<br />
-d<br />
--directory<br />
-f<br />
-F<br />
--classify<br />
--full-time<br />
-l<br />
-lh<br />
-l --human-readable<br />
-lG<br />
-l --no-group<br />
-o<br />
-r<br />
--reverse<br />
-R<br />
--recursive<br />
-s<br />
-S<br />
-t<br />
-U<br />
-x<br />
Table 3-2 Common options to the ls command<br />
Lists most filenames (excludes the . and .. special files)<br />
Lists filenames in column format<br />
Lists filenames without color<br />
Lists directory names instead of their contents<br />
Lists all filenames without sorting<br />
Lists filenames classified by file type<br />
Lists filenames in long format and displays the full modification time<br />
Lists filenames in long format<br />
Lists filenames in long format with human-readable (easy-to-read) file sizes<br />
Lists filenames in long format but omits the group information<br />
Lists filenames reverse sorted<br />
Lists filenames in the specified directory and all subdirectories<br />
Lists filenames and their associated size in kilobytes (KB)<br />
Lists filenames sorted by file size<br />
Lists filenames sorted by modification time<br />
Lists filenames without sorting<br />
Lists filenames in rows rather than in columns<br />
As a result, the * metacharacter is called a wildcard metacharacter. Wildcard metacharacters<br />
can simplify commands that specify more than one filename on the command line, as<br />
you saw with the file command earlier. They match certain portions of filenames or the<br />
entire filename itself. Because they are interpreted by the shell, they can be used with most<br />
common Linux filesystem commands, including a few that have already been mentioned<br />
(ls, file, and cd). Table 3-3 displays a list of wildcard metacharacters and their<br />
descriptions.<br />
© Cengage Learning. All rights reserved. No distribution allowed without express authorization.