4. Files and Directories Management in Linux Flashcards
What is the representation of the root directory?
/
How is represented the home directory of a user?
~
What is the command to know in which directory we’re currently in?
pwd (Print Working Directory)
What does an absolute path start with in linux?
a “/”
What is the command to change directory?
cd (Change Directory)
How do I get directly back to my home directory?
With just the command “cd”
What are the two types of paths in linux?
absolute and relative.
What does the . (dot) represent with the cd command?
The current directory
what does the .. (two dots) represent with the cd command?
The parent directory
What is the keyboard shortcut to autocomplete path and see all possible files with cd command ?
Taping twice the tab key.
What is the shorcut to complete the path with cd command?
Taping once the tab key.
What is the command to list all file inside the current folder?
ls
What is the command to list files with details?
ls -l
What is the command to see file size in human notation ?
ls -lh
What is the command to list files with types?
ls -F
What is the command to see hidden files?
ls -a
What is the meaning of the colour of a file?
no colour = file
blue = directory
cyan = link
How are the directories displayed with the command ls -l ?
Permissions - number of links - user - group - size (Bytes) - date of creation / modification - name
In permissions, what is the meaning of the first character?
Nothing = file
d = directory
l = link
What is the meaning of the three parts of permissions?
1 -> User
2 -> Group
3 -> all other users
What are the different permissions?
r (read) - Can list files in the directory.
w (write) - Can rename, create, and delete files in the directory.
x (execute) - Can “cd” into the directory and grant access files.
What is the meaning of the last character with the command “ls -F” ?
/ -> directory
@ -> link
nothing -> file
How do you recognize a hidden file?
it always starts with a . (dot)
Is it a good thing to create files and folders in the root directory? Yes or no ?
if no, where should you create them ?
No. we should create them in the home directory.