1.9 Links Flashcards

2
Q

What is an inode?

A

The inode is used to store basic information about a file in a linux filesystem. It includes

  • Size
  • Device
  • Owner
  • Permissions
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What is the difference between a hard link and a symbolic link?

A
  • A hard link is a duplicate entry in the file system that points to a specific piece of data on the disk drive. It is indistinguishable from the oringinal file.
  • A symbolic link points to another file system entry (the original), which in turn points to the contents (data) of the file.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

How can you identify a symbolic link when using the ls -l command?

A

A symbolic link has a lower-case L as the first character in the permission string. For example, lrwxrwxrwx.

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

Which type of link is similar to shortcuts in Windows?

A

Symbolic links are similar to shortcuts in Windows

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

Which utilities can you use to create links?

A

Utilities to create links include ln and cp.

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

What is a hard link?

A

A hard link is a duplicate entry in the file system that points to a specific piece of data on the disk drive.

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

What are the features of a hard link?

A
  • Points to the inode of an existing file.
  • Is indistinguishable from the original file.
  • Maintains a valid inode for the file data even if the original file is deleted.
  • Has a dash (-) as the first character in the permission string (which is the same for original files). For example, -rwxr-xr-x.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is a symbolic link?

A

A symbolic link (also known as a soft link) is a file system entry that points to another file system entry, which in turn points to a valid piece of data.

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

What are the features of a symbolic link?

A
  • Has a distinct inode.
  • Can work across volumes and file systems.
  • Is similar to shortcuts in the Windows OS.
  • Has a lower-case L (l) as the first character in the permission string. For example, lrwxrwxrwx indicates a symbolic link.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What does the command ln do?

A

ln creates links to files. With no options, creates hard links.

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

What does the command ln -s do?

A

ln -s creates a symbolic link to a file or directory.

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

What does the command ln -b do?

A

ln -b creates a backup of a file.

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

What does the command ln -i do?

A

ln -i determines the inode for hard or symbolic links.

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

What does the command cp -l do?

A

cp -l creates hard links to the files being copied rather than copying the files.

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

What does the command cp -s do?

A

cp -s creates symbolic links to the files being copied rather than copying the files.

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