The Linux ls command
Last updated
Was this helpful?
Last updated
Was this helpful?
Inside a folder you can list all the files that the folder contains using the ls
command:
If you add a folder name or path, it will print that folder's contents:
ls
accepts a lot of options. One of my favorite combinations is -al
. Try it:
Compared to the plain ls
command, this returns much more information.
You have, from left to right:
the file permissions (and if your system supports ACLs, you get an ACL flag as well)
the number of links to that file
the owner of the file
the group of the file
the file size in bytes
the file's last modified datetime
the file name
This set of data is generated by the l
option. The a
option instead also shows the hidden files.
Hidden files are files that start with a dot (.
).