The File System Flashcards
What are the 2 types of files
- Ordinary Files – people just call these files, but the most technical term is Directory Entries
- Directory Files – or just Directories; AKA folders
What do you call a folder within a folder and vice versa
A child or subdirectory; a parent
What is the most typical max length of characters for a filename
255
What is the max length for pathnames from the root
4096
How is a file hidden
If the filename starts with . or ..
What are the user preferences files called and where are they located
Startup Files; they are in your home directory hidden
What is a pathname called when its from the root
Absolute Pathnames
How do you reference the parent directory
../
What is the /bin
Holds essential command binaries
Where are the booting files
/boot
Where are the files for devices
/dev
What is the /etc
Machine-local system configuration files
What are the 3 file permission user types
- Owner
- Group
- Other
What are the 3 file permissions
- Read
- Write
- Execute
What are the 2 types of arguments for permission changes
- Numeric
- Symbolic
What is the syntax of numeric permission changes
UGO
Where U is for the permissions of the owner of the file
Where G is for the permissions of the group set for the file
Where O is for the permissions of everyone else
Where each letter is an octal number 0 - 7
Where each octal number is calculated as X + Y + Z
Where X represents READ access and is 4 if true or 0 if false
Where Y represents WRITE access and is 2 if true or 0 if false
Where Z represents EXECUTE access and is 1 if true or 0 if false
What is the syntax of symbolic permission changes
USP
Where U is either ‘a’ for all users or 1 or more of the characters ‘u’ for the owner, ‘g’ for the group, and ‘o’ for everyone else
Where S is either ‘+’ to give permissions or ‘-‘ to take away permissions
Where P is 1 or more of the characters ‘r’ for read access, ‘w’ for write access, and ‘x’ for execute access
What are the execute permissions for directories
Basically permission to enter into it to do stuff with the files inside it, but if you dont have read permissions then you cannot see whats inside of it (but having the execute permission allows you to do anything within your permissions of the files inside it, you would just need to know exact filepaths)
You can make sure a file exists in an execute-only directory by using “ls” with the filepath as an argument, but you cannot list all contents without an argument
How can you manage permissions in a more advanced way
Using Access Control Lists (ACLs)
What is a shortcut called
link
What is the difference between hard and soft links
Hard links point specifically to a file, whereas soft links only contain a pathname (which means the actual file you end up to may differ)