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
Q

edquota

A

Edit a quota

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

edquota -p

A

Duplicate the quotas of the prototypical user for each user specified

27
Q

repquota -a

A

Print quotas of all the file systems configured with a quota mount option file at its root

28
Q

repquota -g

A

Print only group quotas

29
Q

repquota -u

A

Print only user quotas

30
Q

repquota -v

A

Print a header line before printing each filesystem quota

31
Q

How to set the setuid bit for a file

A

chmod 4777 myfile (the 4 is what matters, the 777 could be any other set of permissions)

32
Q

How to set the setgid bit for a file

A

chmod 2777 myfile (the 2 is what matters, the 777 could be any other set of permissions)

33
Q

Sticky Bit

A

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
Q

chgrp mygroup file1

A

Changes the group of file1 to mygroup

35
Q

chown root file1

A

Changes the owner of file1 to root

36
Q

ln -s file1 file2

A

Makes a symbolic link to file1 called file2

37
Q

ln file1 file2

A

Makes a hard link to file1 called file2

38
Q

find mydir -name myfile

A

Looks for a file named myfile starting at mydir

39
Q

find /etc -perm 777

A

Will return all files in the /etc directory that has 777 permissions

40
Q

find /etc -size 1M

A

Finds everything starting at /etc that is up to 1MB

41
Q

find /etc -maxdepth 1

A

Will restrict the search to only the /etc directory

42
Q

find /home -user mmiller

A

Will find all things associated with the user mmiller

43
Q

which

A

Display path the indicated command is in (if in PATH variable)

44
Q

whereis

A

Locates the sources/binary and manuals section for specific files

45
Q

/etc/updatedb.conf

A

The database used by the locate command

46
Q

locate

A

Reads from a database to find files by name.

Note: always do updatedb before using locate

47
Q

/etc

A

Holds system configuration files

48
Q

/boot

A

Holds important boot files like the Linux kernel, initial RAM disk, and boot loader config files

49
Q

/bin

A

Holds program files that are critical for normal operations and that ordinary users may run

50
Q

/sbin

A

Holds program files that are critical for normal operation and that ordinary users seldom run. (but root uses)

51
Q

/lib

A

Holds libraries

52
Q

/usr

A

Holds programs and data used in normal system operation bu that aren’t critical for a bare-bones boot of the system

53
Q

/home

A

Users’ home directories

54
Q

/root

A

Root user’s home directory (different than /)

55
Q

/var

A

Holds files that change often

56
Q

/var/tmp

A

Holds temporary files (But should not be deleted when the computer reboots)

57
Q

/tmp

A

Holds temporary files (And should be deleted when the computer reboots)

58
Q

/mnt

A

The traditional mount point for removable media

59
Q

/media

A

The new mount point for removable media

60
Q

/dev

A

Holds device files, providing low-level access to the system’s hardware

61
Q

usr/local/bin
and
usr/local/sbin

A

The locally compiled programs

62
Q

repquota -s

A

A more readable format for the repquota command

63
Q

quotacheck

A

Builds the database of file system information that quota commands will use