Created lørdag 22 oktober 2016
$ ls /path/to/folder
$ ls -a # Display hidden files too
$ ls -l # File owner and permissions
Output with -l
drwxr-xr-x 2 stick stick 4096 15.10.2016 17:25 Desktop/
drwxr-xr-x 7 stick stick 4096 03.10.2016 14:52 Documents/
drwxr-xr-x 6 stick stick 4096 16.10.2016 10:02 Downloads/
etc.
# The drwxr-xr-x is the file-type and the permissions, followed by the user and group.
[file type] [user] [group] [others] user group
d rwx r-x r-x stick stick
File types
# Explanation of all values
$ info ls -n "What information is listed"
( - ) = normal file
( d ) = directory
( l ) = symbolic
Permissions
# Each user, group and other has 3 characters that defines their permissions, rwx etc.
First letter : | - = cannot be read, | r = read access |
Second letter : | - = cannot be modified | w = can be modified |
Third letter : | - = cannot be executed | x = executable |