Types of files in UNIX Flashcards
What are the type of files in Unix?
- Ordinary files
- Directory files
- Special files
- Link files
- Socket files
- Named Pipe files
What files are found at the end of each path in the Linux filesystem tree?
Ordinary file or Directory file
What are ordinary files?
Are simply called files and they appear at the end of paths that can not support other paths.
What are directory files?
They are simply called directories or folders and they appear at the end of paths that support other paths to branch out.
List the types of special files
Character special file
Block special file
What are special files?
Linux treats all hardware devices as special files
Where are special files located?
/dev
What is a character special file?
Represents a device that transfers data in bytes such as a monitor or a printer.
What is a block special file?
Represents a device that transfers data in blocks such as a hard drive.
What are Link files?
A link file is a pointer to another file. It allows us to use a file with a different filename and from a different location.
What are the types of links?
Hard link
Symbolic or soft link
What does a hard link do?
It creates a mirror copy of the original file, and it can not be created to a directory or a file on another filesystem.
What does a symbolic or soft link do?
It creates a pointer to the original file, and it can be created to a directory or a file on another filesystem.
What are the types of path names?
Absolute
Relative
What is the difference between Absolute and Relative Path names?
Absolute path name begins with the root while relative path name doesn’t begin with root.
What are the types of users?
- Root user or Super user
- Normal user
What is a root user?
it has the highest privileges and you can do anything inside the operating system.
What is a normal user?
Are the accounts that you use regularly and have no privilege for changing system files and root-managed files.
What is a super user?
Is a user who can gain root power, which means they gain root access on requirement.
Linux command to switch user
su <username></username>
Linux command to switch user to root
su - or su root
Linux command to switch to root user without password
sudo su