Listing Files and Directories
Learn how to list files and directories using the CLI.
We'll cover the following...
The ls
command
The ls
command shows us the contents of a directory. By default, it only shows part of the story. We can get a more descriptive listing by passing some additional arguments to the command. Let’s run the terminal to execute the command ls -l
in our home directory. (That’s a lowercase L.)
$ ls -l
This gives us a long listing of the current directory’s contents. The file names are all the way on the right side, preceded by some additional information. How it breaks down is shown in the figure below.
Directory Contents
Type | Permissions | Links | User owner | Group | Size | Date modified | Filename |
|
|
|
|
|
|
|
|
In the case of the Educative platform,
User Owner
andGroup
are ...