Devices, Linux Filesystems, Filesystem Hierarchy Standard Flashcards

1
Q

fdisk

A

Used to partition a disk device

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

How many partitions can you have by default? (Without extended or logical partitions)

A

4

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

fdisk -n

A

Interactive mode

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

mkfs -t ext3 mydev

A

Makes mydev an ext3 file system

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

mkfs -c

A

Used to check the device for bad blocks before building the file system

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

mkswap

A

Turns a file system into swap

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

du

A

Used to estimate file space usage

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

du -c

A

Produce a grand total

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

du -h

A

Human readable

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

du –max-depth N

A

Print the total for a directory only if it is N or fewer levels below the command line argument

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

du -b

A

Makes output in bytes

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

dumpe2fs

A

Obtains file system info

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

mke2fs

A

equivalent of “mkfs -t ext2/3/4”

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

tune2fs

A

Allows you to change the file system parameters

Note: file system must be unmounted

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

fsck -A

A

Check all file systems in /etc/fstab

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

fsck -a

A

Attempt to automatically repair all errors

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

fsck -C

A

Display completion/progress

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

fsck -N

A

Don’t execute, just show what would happen

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

debugfs

A

Interactively modify a file system

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

mount -a

A

Causes all file systems in /etc/fstab to be mounted as indicated

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

mount -o

A

Override mount options in /etc/fstab when manually mounting partition

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

unmount -f

A

Forcibly unmount a filesystem

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

/etc/fstab

A

Configuration file containing persistent file system mounts (for mounting on boot)

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

quotaon

A

Turns quotas on

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
edquota
Edit a quota
26
edquota -p
Duplicate the quotas of the prototypical user for each user specified
27
repquota -a
Print quotas of all the file systems configured with a quota mount option file at its root
28
repquota -g
Print only group quotas
29
repquota -u
Print only user quotas
30
repquota -v
Print a header line before printing each filesystem quota
31
How to set the setuid bit for a file
chmod 4777 myfile (the 4 is what matters, the 777 could be any other set of permissions)
32
How to set the setgid bit for a file
chmod 2777 myfile (the 2 is what matters, the 777 could be any other set of permissions)
33
Sticky Bit
A permission bit that is set on a file or a directory that lets only the owner of the file/directory or the root user to delete or rename the file.
34
chgrp mygroup file1
Changes the group of file1 to mygroup
35
chown root file1
Changes the owner of file1 to root
36
ln -s file1 file2
Makes a symbolic link to file1 called file2
37
ln file1 file2
Makes a hard link to file1 called file2
38
find mydir -name myfile
Looks for a file named myfile starting at mydir
39
find /etc -perm 777
Will return all files in the /etc directory that has 777 permissions
40
find /etc -size 1M
Finds everything starting at /etc that is up to 1MB
41
find /etc -maxdepth 1
Will restrict the search to only the /etc directory
42
find /home -user mmiller
Will find all things associated with the user mmiller
43
which
Display path the indicated command is in (if in PATH variable)
44
whereis
Locates the sources/binary and manuals section for specific files
45
/etc/updatedb.conf
The database used by the locate command
46
locate
Reads from a database to find files by name. | Note: always do updatedb before using locate
47
/etc
Holds system configuration files
48
/boot
Holds important boot files like the Linux kernel, initial RAM disk, and boot loader config files
49
/bin
Holds program files that are critical for normal operations and that ordinary users may run
50
/sbin
Holds program files that are critical for normal operation and that ordinary users seldom run. (but root uses)
51
/lib
Holds libraries
52
/usr
Holds programs and data used in normal system operation bu that aren’t critical for a bare-bones boot of the system
53
/home
Users' home directories
54
/root
Root user's home directory (different than /)
55
/var
Holds files that change often
56
/var/tmp
Holds temporary files (But should not be deleted when the computer reboots)
57
/tmp
Holds temporary files (And should be deleted when the computer reboots)
58
/mnt
The traditional mount point for removable media
59
/media
The new mount point for removable media
60
/dev
Holds device files, providing low-level access to the system's hardware
61
usr/local/bin and usr/local/sbin
The locally compiled programs
62
repquota -s
A more readable format for the repquota command
63
quotacheck
Builds the database of file system information that quota commands will use