ls -p code example
Example 1: ls -F
-rwxrw-r-- 10 root root 2048 Jan 13 07:11 afile.exe
?UUUGGGOOOS 00 UUUUUU GGGGGG #### ^-- date stamp and file name are obvious ;-)
^ ^ ^ ^ ^ ^ ^ ^ ^
| | | | | | | | \--- File Size
| | | | | | | \-------- 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
Example 2: ls -a
ls command list computer files in a directory in Unix OS with next structure:
ls [OPTION]... [FILE]...
Examples:
ls -l #display all files in current directory with (-l) long format.
ls -a /directory #display all hidden files in given directory that start with .
Example 3: ls -l
0 success
1 minor problems (e.g., failure to access a file or directory not
specified as a command line argument. This happens when listing a
directory in which entries are actively being removed or renamed.)
2 serious trouble (e.g., memory exhausted, invalid option, failure
to access a file or directory specified as a command line argument
or a directory loop)