The ls command

The ls command lists all of the files and directories that exist in the current working directory. So it's similar to the dir command in Windows machines; it just lists all of the files and directories that exist in the current directory:

ls

And, as we execute this command, the output for it lists all of the directories, such as Desktop, Documents, Downloads, and Music:

Let's run ls with some options. We going to use ls and then use -l, and that will show us more information about the files. It's basically the same command that we ran before, but, as we can see in the following screenshot, we now get more information. We can see the total entries that exist in the current working directory, and we can see the same directories that we saw before, but we can also see the dates that they were created or modified. We can see the user responsible for them, and its root use, and we can also see permissions:

We will learn more about permissions in the next chapters. Permissions specify which users can do what (read, write, execute). This is just an example of the ls command.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.217.6.114