Filesystem Features Flashcards

1
Q

Name the four extended attribute flags

A

immutable, append-only, no-dump, no atime update

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

How can I view extended attributes

A

lsattr

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

How can I change attributes

A

chattr

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

How do format a filesystem on a partition

A

mkfs (sudo mkfs -t ext4 /dev/sda0)

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

How do I check for errors in a filesystem

A

fsck (sudo fsck -t ext4 /dev/sda1)

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

How do I mount a filesystem

A

mount (sudo mount -t ext4 /dev/sda1 /home)

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

How do I find the currently mounted filesystems

A

mount

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

How do I unmount filesystems

A

umount (sudo umount /home)

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

How do I mount a network share

A

mount (sudo mount -t nfs myserver.com:/shdir /mnt/shdir)

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

How are filesystems mounted at boot

A

during boot, mount -a is executed, which reads and mounts all systems isted in /etc/fstab

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

How can I tell the system to automatically mount a filesystem

A

with a line /etc/fstab (which uses the automount facility in systemd) (LABEL=Sam128 /SAM ext4 noauto,x-systemd.automount,x-systemd.device-timeout=10,x-systemd.idle-timeout=30 0 0)

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

How do I list swap areas

A

cat /proc/swaps

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

List the swap-related commands

A

mkswap, swapon, swapoff

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

How do I enable quota

A
  • mount filesystem with usrquota and/or grpquota specified in /etc/fstab (/dev/sda5 /home ext4 defaults, usrquoata 1 2)
  • run quaotacheck (sudo quotacheck -vu /home
  • enable quotas (sudo quotaon -vu /home)
  • set quotas (sudo edquota -u username)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

How do I examine quotas

A

sudo quota username

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

How do show filesystem usage

A

df -hT

17
Q

How do I show disk usage

A

du -a /etc/continuum