Chapter 13 File Systems Flashcards

(16 cards)

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

What is a block device in Linux?

A

A storage device that must be formatted before the file system can use it

Common examples include hard drives, which are stored in ‘/dev’.

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

What are the common devices in Linux storage?

A
  • SATA hard drives
  • First hard drive: sda
  • First partition: sda1
  • Second partition: sda2
  • Second hard disk: sdb

Devices are identified in the ‘/dev’ directory.

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

What must be done to a partition before it can be used?

A

It must be mounted at a mount point

The first partition loaded upon boot is the root partition.

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

What is a logical volume in Linux?

A

A collection of block devices that appears as one partition

It is created from multiple block devices and is also viewable in ‘/dev’.

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

Which command is used to view information about partitions/volumes?

A

$df

Use ‘$df -h’ for human-readable sizes.

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

What command is used to mount a device in Linux?

A

mount

You can specify the device name or the UUID.

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

How do you manually mount the second partition on the first disk to /backup?

A

$sudo mount /dev/sda2 /backup

If the device is disconnected, it will unmount automatically.

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

What should you do before disconnecting a device?

A

Unmount the device

Use ‘$sudo unmount /backup’ to safely disconnect.

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

What command can be used to find which files are open on a mounted device?

A

$sudo lsof /backup

This command lists open files and their process IDs.

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

What is the purpose of the mlocate service?

A

Creates a database of files and paths every day

The command ‘locate’ searches this database.

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

What command is used to locate files in Linux?

A

locate

Use ‘$locate homework’ to find files containing ‘homework’.

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

What command is used for a real-time search of files?

A

find

It is slower but more accurate for frequently changing systems.

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

How do you find files owned by the user hector?

A

$find / -user hector

This command searches the entire file system.

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

What command would you use to find files larger than 5GB?

A

$find / -size +5G

This command searches the entire file system for large files.

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

To find files modified less than an hour ago, you would use:

A

$find / -mmin 60

This command searches for recently modified files.