Understanding Linux file Types Flashcards
what does POSIX stand for?
POSIX = Portable Operation System Interface
How many file types does the POSIX standard define?
7
Which are the file types?
Regular
Directory
Sym link
FIFO
Block
Character
Socket
What is the command to see a file’s type?
file
what defines a file’s type?
what defines a file’s type is its magic number in the header and the #file command interprets this #
How can you identify a regular file?
Regular files: denoted by a hypen - in ls -l
What do regular files have?
they have a file name pointing to an inode which in turn points to a data block
Can a regular file contain another file or directory?
No
How can you identify a directory?
they are denoted by a d - in ls -l
What do directories have within?
They have entries to other directories (sub dir) and other regular files
Can hard links be a directory?
No
Hard links are limited to the same what?
Hard links must be in the same inode table, meaning the same File system
What do hard links have?
they have a file name pointing to an inode which in turn points to a data block, same as a regular file
How can you identify a sym link?
in the output of ls -l, you will see a lowecase L
For who can you create sym links?
Sym links can be created for files and directories as well