What exactly is the long format in Linux?.
I am a newbie into programming and Linux. So I was taking a tutorial in terminal operations.
This command ls -l
is said to list the files in the working directory in long format.
Can somebody explain or give resources explaining about the long format and its use?
In Linux there are basically three types of files: Ordinary/Regular files. Special files. Directories.
The -l ( lowercase L) option tells ls to print files in a long listing format.
List files in long format. Type the ls -l command to list the contents of the directory in a table format with columns including: content permissions.
Hence, ls -lrt command lists the contents of the directory with all the details, in reverse order of their modification time (older files will be displayed first). $ ls -ltr.
As you already may know, ls
shows you the directories and files in your current folder.
ls -l
(or shortly ll) prints you the long format as follows:
drwxr-xr-xr root root 1093 Oct 7 09:26 file
these stand for:
root root
stands for the owner of the file and the group owner (you will find out about root as you carry on learning about linux).For more explanation visit this link: http://go2linux.garron.me/command-ls-file-permissions
The phrase "long format" simply means a format that is longer than some other format. There is no general Linux or UNIX concept of "long format". In this case, it refers to the output format produced by the ls
command with the -l
option, and only to that.
The "long format" used by ls
is documented in the ls
document (man ls
or info ls
), and can be seen by comparing the output of ls -l
to the output of ls
.
Other commands may have their own long formats, either based on the ls
long format or not.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With