Storage and Filesystems Flashcards

1
Q

What is stored in /bin

A

Executable programs necessary for the system (in single user mode)

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

What is in /boot

A

Boot loader files

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

What is in /dev

A

Device files

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

What is in /etc

A

System and service config files

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

What is in /home

A

User data files/profiles

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

What is in /lib

A

Library files needed by executables

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

How to search for a file and not see search (access) errors?

A

find / -name STRING 2>/dev/null

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

What would you use [ ] for in a regex

A

To contain a list of possible values

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

What would you use - for in a regex

A

To describe a range of values

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

What is the . used for in a regex?

A

A wildcard for any single character

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

What is the ^ or $ used for in a regex

A

The ^ is used to reference finding something at the beginning of a line, the $ the end

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

What is the | used for in a regex?

A

Or

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

What would you use \ for in a regex?

A

Escape character : I.e you want to search for $ or “ not use them as expressions

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

How do you perform a regular expression (in grep)?

A

-E “EXPRESSION”

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

3 popular options for sort command

A

-k NUMBER (sort by a different column)
-r (reverse)
-t DELIMITER (, or “ “ )

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

How to change owner of file and group at the same time?

A

sudo chown USER:GROUP FILE

17
Q

How to check if FACL is enabled

A

sudo tune2fs -l
And check for the line “ Default Mount Options”

18
Q

How to set a FACL

A

setfacl -m or -s u:USER:PERM FILE

m for modify
s for set (new setup)
x for remove

19
Q

How to assign default group permissions to a directory with FACL

A

setfacl -m d:g:GROUP:PERM DIR

20
Q

What is grub2-mkconfig used for

A

Creating a new grub config file in protected (checked) manner

21
Q

Where would you find the grub configuration

A

/boot/efi/EFI
/etc/grub.d

22
Q

What is the boot process in 5 steps?

A

BIOS/UEFI
MBR/GPT
GRUB2
initrd/Kernel
systemd process

23
Q

How do you check storage use on the system

A

df -h for system wide and -human readable

du -h —maxdepth=NUM DIR for directory and recursive also with sending errors from this 2>/dev/null

24
Q

What is initrd.img

A

It’s the ram loading ‘boot image’ of initrd process

25
Q

What is vmlinuz

A

This is the Kernel!
Ending with a z usually zipped, ending with a x unzipped.

26
Q

rsync common options…

A

a archive
z zip
u update (skip existing files)
r recursive
P display progress

27
Q

How to rsync thru SSH

A

rsync -OPTIONS -e SSH SOURCE USERNAME@HOST/IP DEST

28
Q

How would you test a complicated rsync instruction

A

Use —dry-run at the end of it

29
Q

What are the 3 integral parts of the SCSI framework?

A

Upper : device driver layer
Middle: SCSI routing
Lower: Host Bus Adapter

30
Q

Less common ‘ls’ options

A

-d directory meta
-F classify file type
-R recursive tree
-Z security context

31
Q

Create a hard link

A

ln /ORIGINAL /HARDLINK

32
Q

Create a soft link

A

ln -s /ORIGINAL -/SOFTSYMBOLIC

33
Q

common “rm” options

A

-d delete empty dirs
-f —force
-i ask before deletion
-I ask before deleting >3 files or during recursive
-R-r recursive
-v verbose

34
Q

Which options in /etc/fstab designate filesystem with quotas

A

usrquota
grpquota