ls is a wonderful command because it allows the user to see what's inside of a directory (aka folder) without having to peek it with the GUI. Here's a good way to start.
The computer, reading the default directory (my home folder), outputted the others directories within the directory. In this case, we call my home folder a parent directory and the others that follow child directories, like saying a branch with more branches.
ls functionality is enriched with the use of options. Options typically require "-" sign, followed by a letter.
Some worthy ls options include...
- -a : lists all contents and directories within the working directory.
- -l: lists directories in a long format.
- -S : lists directories from biggest to smallest size.
-t : lists
contents by most to least recently modified.
So, if you wrote,
Notice a slightly different order between the first and this example. That's because the directories were ordered by the most to least recently modified, which means that Pictures is the last place I looked at and the Documents tab the most recent.
The commands equipped with options really organize search up well, especially when sifting through a daunting number of files.
If this gave you the intuition to get sparked by the wonders of the CLI or you have some questions in mind, please comment or question about it on the comments section below.