- List Files and Folders
- List the Contents of Other Folders
- List Folder Contents Using Wildcards
- View a List of Files in Subfolders
- View a List of Contents in a Single Column
- View Contents As a Comma-Separated List
- View Hidden Files and Folders
- Visually Display a File's Type
- Display Contents in Color
- List Permissions, Ownership, and More
- Reverse the Order Contents Are Listed
- Sort Contents by Date and Time
- Sort Contents by Size
- Express File Sizes in Terms of K, M, and G
- Display the Path of Your Current Directory
- Change to a Different Directory
- Change to Your Home Directory
- Change to Your Previous Directory
View a List of Contents in a Single Column
So far, you’ve just been working with the default outputs of ls. Notice that ls prints the contents of the directory in alphabetical columns, with a minimum of two spaces between each column for readability. But what if you want to see the contents in a different manner?
If multiple columns aren’t your thing, you can instead view the results of the ls command as a single column using, logically enough, ls -1 (or ls --format=single-column).
$ ls -1 ~/bin Desktop documents iso music pictures podcaststodo videos
This listing can get out of hand if you have an enormous number of items in a directory, and more so if you use the recursive option as well, as in ls -1R ~/. Be prepared to press Ctrl+C to cancel the command if a list is streaming down your terminal with no end in sight.