2.3 Using Directories and Listing Files - Part 2 Flashcards
Which directory in a normal file system of Linux would you expect to find basic command file?
/bin
Which directory in a normal Linux file system would you expect to find system configuration files?
/etc
Which directory in a normal Linux file system would you expect to find system log files?
/var
What does the “ls” command in Linux do?
What are some common options used with the “ls” command?
The “ls” command prints a list to the screen of all files and directories that are not hidden files
Options
-l creates a “long list” which shows permissions, ownership, size, modification date, and name
-h makes the list human readable
-d shows directories but not their contents
-d */ shows only subdirectories without files
-lt shows long list sorted by modification time (oldest files first)
-lrt shows long list with modification time reversed (newest files first)
-ls -lX long list and group all files by type
ls -S sorts by file size
ls -R displays a recursive list