Types of files in UNIX Flashcards

1
Q

What are the type of files in Unix?

A
  1. Ordinary files
  2. Directory files
  3. Special files
  4. Link files
  5. Socket files
  6. Named Pipe files
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

What files are found at the end of each path in the Linux filesystem tree?

A

Ordinary file or Directory file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are ordinary files?

A

Are simply called files and they appear at the end of paths that can not support other paths.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What are directory files?

A

They are simply called directories or folders and they appear at the end of paths that support other paths to branch out.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

List the types of special files

A

Character special file
Block special file

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are special files?

A

Linux treats all hardware devices as special files

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Where are special files located?

A

/dev

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

What is a character special file?

A

Represents a device that transfers data in bytes such as a monitor or a printer.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a block special file?

A

Represents a device that transfers data in blocks such as a hard drive.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What are Link files?

A

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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the types of links?

A

Hard link
Symbolic or soft link

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What does a hard link do?

A

It creates a mirror copy of the original file, and it can not be created to a directory or a file on another filesystem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What does a symbolic or soft link do?

A

It creates a pointer to the original file, and it can be created to a directory or a file on another filesystem.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are the types of path names?

A

Absolute
Relative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the difference between Absolute and Relative Path names?

A

Absolute path name begins with the root while relative path name doesn’t begin with root.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What are the types of users?

A
  1. Root user or Super user
  2. Normal user
17
Q

What is a root user?

A

it has the highest privileges and you can do anything inside the operating system.

18
Q

What is a normal user?

A

Are the accounts that you use regularly and have no privilege for changing system files and root-managed files.

19
Q

What is a super user?

A

Is a user who can gain root power, which means they gain root access on requirement.

20
Q

Linux command to switch user

A

su <username></username>

21
Q

Linux command to switch user to root

A

su - or su root

22
Q

Linux command to switch to root user without password

A

sudo su