The ls -al
command shows the following output;
-rwxrw-r-- 10 root root 2048 Jan 13 07:11 afile.exe
What are all the fields in the preceding display?
The
What are all the fields in the preceding display? |
|||||||||
|
In the order of output;
File permissions is displayed as following;
In your example
|
|||||||||||||||||||||
|
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:
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 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 Finally, the very first character is the file type; typically one of: 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. |
|||||||||
|
On GNU systems, it is described in Here is quote from it:
|
||||
|
The first column is the file mode, the next column is the numbers of link that the file has, the third and fourth are the name of the owner and the group which the file belongs to. Next column says the number of bytes of the file (some |
||||
|