Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is long-format in Linux?

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?

like image 684
Arun Mohan Avatar asked Oct 09 '14 14:10

Arun Mohan


People also ask

What are the 3 types of files in Linux?

In Linux there are basically three types of files: Ordinary/Regular files. Special files. Directories.

Which command will display the file in long format in Linux *?

The -l ( lowercase L) option tells ls to print files in a long listing format.

Which command will display the file in long 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.

What is LRT in Linux?

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.


2 Answers

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:

  • permissions(r-read,x-execute,w-write) if any of these fields is disabled, you don't have the permission to do it.
  • 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).
  • Next is the file size, after which the date the file was created, the time when it was last modified and the files name.

For more explanation visit this link: http://go2linux.garron.me/command-ls-file-permissions

like image 127
balinteu Avatar answered Oct 29 '22 20:10

balinteu


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.

like image 34
Keith Thompson Avatar answered Oct 29 '22 21:10

Keith Thompson