🌐
Reddit
reddit.com › r/linux4noobs › what does ls * and ls * * do and what is the difference?
r/linux4noobs on Reddit: What does ls * and ls * * do and what is the difference?
September 19, 2019 - The ls command will list the contents of the current directory by default. By using the * it will list the contents of the current directory, and all subdirectories with any name.
🌐
Pluralsight
pluralsight.com › tech insights & how-to guides › cloud
Linux Commands for Beginners: LS | Pluralsight
LS lists the contents of your current working directory. This is very simple if you have a directory with a few files in it and hard to use if you have a directory with hundreds or even thousands of files in it.
🌐
Reddit
reddit.com › r/linux › try to explain linux shell ls command in short
r/linux on Reddit: Try to explain linux shell ls command in short
December 8, 2020 - The best explanation style ever. ... Some people (or scripts) actually use bytes.... also if you are too assed out to type '-h' there are these things called alias that you can add to your shell profile. Shit, i think even Windows Powershell makes liberal use of them....even though now that I think about it even their ls command (a built in alias for whatever the actual listing command on windows is) outputs listing in bytes!
🌐
High Performance Computing
hpc.ncsu.edu › Documents › unixtut › unix1.html
Linux Tutorial One
The ls command lists the contents of your current working directory.
🌐
Explain Shell
explainshell.com › explain
explainshell.com - ls
explainshell.com · about · theme · Light · ls(1) · other manpages · plan9-ls(1) · ls(1posix) · source manpages: ls
🌐
Medium
medium.com › @1840 › understanding-linux-the-ls-command-53e830bf127a
Understanding Linux — the LS command | by Chris D | Medium
June 9, 2020 - The ls command in Linux is the fastest way to get familiarized with the directory you are in. Upon entering the command into the terminal, you will see all the immediately visible files and directories (folders) within your current working directory.
🌐
Wikipedia
en.wikipedia.org › wiki › Ls
ls - Wikipedia
1 month ago - ls is a shell command for listing files – including special files such as directories. Originally developed for Unix and later codified by POSIX and Single UNIX Specification, it is supported in many operating systems today, including Unix-like ...
🌐
GeeksforGeeks
geeksforgeeks.org › ls-command-in-linux
ls Command in Linux - GeeksforGeeks
April 11, 2025 - The ls command is used to list all directories and files in the Linux terminal. When we run the command basically it displays the contents of you current directory or folder so that users can view the names of file, directories, and their ...
🌐
University of Cambridge
maths.cam.ac.uk › computing › linux › unixinfo › ls
The ls command | Computing
The ls command is used to list files. "ls" on its own lists all files in the current directory except for hidden files. "ls *.tex" lists only those files ending in ".tex". There are a large number of options; here are some of the most useful.
Find elsewhere
🌐
It's FOSS
itsfoss.com › ls-command
Using ls Command in Linux
July 4, 2023 - The ls command stands for a list; all it does is list the contents of the specified directory.
🌐
LinuxQuestions.org
linuxquestions.org › questions › linux-newbie-8 › ls-output-interpretation-907297
[SOLVED] ls output interpretation
hi guys, need your help to understand the ls output command drwxr-xr-x 2 root root 4096 oct 9 2011 xml d - directory rwxr - permission for the owner
🌐
University of Pennsylvania - School of Arts & Sciences
sas.upenn.edu › ~saul › parasite › man › man1 › ls.1.html
ls - list contents of directories
For each directory named, ls lists information for each file in that directory. For each file named, ls lists information for that file. If name is /, ls lists the contents of the root directory.
🌐
Linuxize
linuxize.com › home › linux commands › ls command in linux (list files and directories)
Ls Command in Linux (List Files and Directories) | Linuxize
December 27, 2025 - The ls command lists files and directories within the filesystem, displaying detailed information about them.
🌐
Medium
medium.com › @linoxide › explain-ls-command-in-linux-d09743e84023
Explain LS Command in Linux. Linux ls command is used to list files… | by Linoxide | Medium
October 5, 2018 - Linux ls command is used to list files and directories. By default, it will list the content of the current directory. In this article, I…
🌐
Linux Handbook
linuxhandbook.com › ls-command
ls Command in Linux: 17 Useful Examples Explained
August 17, 2025 - The ls command is one of the first commands we learn when discovering the shell.
🌐
Medium
medium.com › @akintolamayode1 › understanding-ls-l-c-command-in-linux-4f9891679fd5
Understanding “ls -l *.c” command in Linux | by Akintola Mayode | Medium
August 25, 2021 - The “ls” command is a command-line utility for listing the contents of a directory or directories via standard input.
🌐
ComputerNetworkingNotes
computernetworkingnotes.com › linux-tutorials › the-output-of-the-ls-l-command-explained.html
The output of the ls -l Command Explained
January 12, 2020 - The ls command with the l option provides detailed information about the contents stored in the specified directory. The detailed information includes name, location, permission, owner, created and modified date, size, and type of the content.
Top answer
1 of 5
350

In the order of output;

-rwxrw-r--    1    root   root 2048    Jan 13 07:11 afile.exe
  • file permissions (-rwxrw-r--),
  • number of (hard) links (1),
  • owner name (root),
  • owner group (root),
  • file size in bytes (2048),
  • time of last modification (Jan 13 07:11), and
  • file/directory name (afile.exe)

File permissions is displayed as following;

  • first character is most often -, l or d. A d indicates a directory, a - represents a regular file, l is a symlink (or soft link) and other letters are used for other types of special files
  • three sets of characters, three times, indicating permissions for owner, group and other:
    • r = readable
    • w = writable
    • x = executable (for files) or accessible (for directories)
  • this may be followed by some other character of there are extended permissions, like e.g. Linux ACL that are marked with a +.

In your example -rwxrw-r--, this means the line displayed is:

  • a regular file (displayed as -)
  • readable, writable and executable by owner (rwx)
  • readable, writable, but not executable by group (rw-)
  • readable but not writable or executable by other (r--)

The number of hard links means the number of names the inode has, i.e. links created with ln without the -s option.

2 of 5
136

The output of the "ls" command depends on the version of "ls", the options used, the platform used, etc. It appears from your example that you're using it from a typical un*x (such as Linux), and probably using a typical modern "ls" version. In which case:

-rwxrw-r--    10    root   root 2048    Jan 13 07:11 afile.exe
?UUUGGGOOOS   00  UUUUUU GGGGGG ####    MON DD XX:XX FILENAME
^ ^  ^  ^ ^    ^      ^      ^    ^      ^            ^- Filename.
| |  |  | |    |      |      |    |      \-------------- Time of last modification.
| |  |  | |    |      |      |    \--------------------- File Size OR for directory size of the metadata. (Size is *usually* in bytes on modern systems; See below.)
| |  |  | |    |      |      \-------------------------- Group Name (for example, Users, Administrators, etc)
| |  |  | |    |      \--------------------------------- Owner Acct
| |  |  | |    \---------------------------------------- Link count (what constitutes a "link" here varies)
| |  |  | \--------------------------------------------- Alternative Access (blank means none defined, anything else varies)
| \--\--\----------------------------------------------- Read, Write and Special access modes for [U]ser, [G]roup, and [O]thers (everyone else)
\------------------------------------------------------- File type flag        

I am not sure why your link count is so high for the example file you listed. Some platforms have an odd notion of what constitutes a "link". These usually include hard links and symbolic links, as well as directory entries (which is why directories often have high link counts – its parent has one link, the directory has a link to itself in the . entry, and each of its sub-directories has a link back via ..).

Some versions and/or command line flags will list the number of blocks used instead of the number of bytes; a filesystem with a block size of 1024 bytes will list all sizes up to 1024 bytes as "1", meaning 1 block is used, from 1025 to 2048 as "2", using 2 blocks, and so on. But listing block sizes by default (without explicitly using a command line option) is rare on most modern un*x machines.

The special/alternative access flag is usually a blank space, but on some platforms, it may be used to indicate there are special/alternative access modes (such as ACLs and security descriptors on WIN32, etc), and varies widely – consult your manual, man pages, info tool, or what-not.

The permissions (mode) flags (UUUGGGOOO) are three sets of three chars, where the first set is "User" (i.e., Owner), the second set is "Group" and the third set is "Others" (i.e., everyone else; anyone who is neither Owner nor Group). The three permissions flags in each set are typically r or - meaning the User/Group/Others can read the file (r) or not (-), followed by w or - indicating whether they can write to the file (you can have files which you can write to, but cannot read, as odd as that may sound!), and the third character is a 'catch-all' flag for other modes, typically something like x for execute (for directories, it means you can attempt to access the directory contents), or - for none. Sometimes you may encounter an s or S for setuid and/or setgid programs, or other less common characters; see your ls documentation for the mode characters it will show.

Finally, the very first character is the file type; typically one of: d for directory, l for a symbolic link (hard links show normally without a special character of their own), or - for a normal file. There are many other, but less commonly seen, file types for various filesystems. These first ten characters (file type and permissions) are discussed on Wikipedia. Again, your documentation will tell you exactly what kind of file types your command supports and displays.

BTW, if you cannot find a man/info page for ls itself (man ls/info ls), try looking in the "coreutils" package (info coreutils). Also note that among the more common platforms, Microsoft platforms tend not to translate very well to ls output, so you may see odd behavior, flags, or other unusual info in the output, depending on how your version of ls was compiled, what it was linked against, etc.

One more caveat: The file time stamp is usually the date/time the file was last modified, not the time the file was created. In fact, on a un*x-ish filesystem, there is no record of the file creation time; the ctime field does NOT mean "creation time" as it does on FAT/NTFS filesystems, but rather, it means the "inode [C]hange time" – the time the inode itself was last modified. The "mtime" (last [M]odified) and atime (last [A]ccesed/read) timestamps are the same on both systems – although the precision (FAT has a granularity of two seconds, for example) and time zone may vary.