Title: Theory / Unimportant / CS / command line / disk / fsck
Tags: computer_to_instruction fromCommandLine hasNotNewEffectReturnsMeaning

Instruction: fsck
Page: https://linux.die.net/man/8/fsck
Effect: check filesystems in /etc/fstab serially.
Context: Command line
Returns: a sum of flags signalling what happenned.
Other fields (not shown on cards):
Etymology: File System Check

Question: A fylesystem can be represented in fsck with
Answer: a device name (e.g. /dev/hdc1, /dev/sdb2),
Page: https://linux.die.net/man/8/fsck
Context: fsck
Answer2: a mount point (e.g. /, /usr, /home),
Answer3: an ext2 label or UUID specifier (e.g. UUID=8868abf6-88c5-4a83-98b8-bfc24057f7bd or LABEL=root)

Fla: -s
Effect: Serialize fsck operations.
Page: https://linux.die.net/man/8/fsck
Prefix: fsck

Fla: -t foo_1, ..., foo_n
Effect: Only check filesystems whose type is some foo_i
Page: https://linux.die.net/man/8/fsck
Prefix: fsck

Fla: -t !foo_1, ..., foo_n
-t no foo_1, ..., foo_n_
Effect: Only check filesystems whose type is none of the foo_i
Page: https://linux.die.net/man/8/fsck
Prefix: fsck

Fla: -A
Effect: Walk through the /etc/fstab file and try to check all file systems in one run
Page: https://linux.die.net/man/8/fsck
Prefix: fsck

Instruction: fsck.foo
Page: man fsck
Effect: fsck for file system foo
Variables: foo a linux file system

Fla: -l
Effect: Create an exclusive flock(2) lock file (/run/fsck/<diskname>.lock) for whole-disk device.
Page: man fsck
Prefix: fsck
Variables: foo a linux file system
Assuming: Single device used

Fla: -r
Effect: Report some satistics related to the run
Page: man fsck
Prefix: fsck
Variables: foo a linux file system

Fla: -r foo
Effect: Report some satistics related to the run in the file foo
Page: man fsck
Prefix: fsck

Fla: -C
Effect: Display completion/progress bars for those filesystem checkers
Page: man fsck
Prefix: fsck
Assuming: For ext2,3 and 4

Fla: -M
Effect: Do not check mounted filesystems and return
Page: man fsck
Prefix: fsck
Print: 0 for mounted filesystems.

Fla: -N
Effect: Don't execute, just show what would be done.
Page: man fsck
Prefix: fsck

Fla: -P
Effect: Check the root filesystem in parallel with the other filesystems.
Page: man fsck
Prefix: fsck
Extra: This is not the safest thing in the world to do, since if the root filesystem is in doubt things like the e2fsck(8) executable might be corrupted!
This option is mainly provided for those sysadmins who don't want to repartition the root filesystem to be small and compact (which is really the right solution).
Assuming: the -A flag is set

Fla: -R
Effect: When checking all filesystems with the -A flag, skip the root filesystem.
Page: man fsck
Prefix: fsck
Extra: This is useful in case the root filesystem has already been mounted read-write.

Fla: -T
Effect: Don't show the title on startup.
Page: man fsck
Prefix: fsck

Fla: -V
Effect: Produce verbose output, including all filesystem-specific commands that are executed.
Page: man fsck
Prefix: fsck

Fla: --help
Effect: Display help text and exit.
Page: man fsck
Prefix: fsck
Flag abbreviation: -?

Fla: --version
Effect: Display version information and exit.
Page: man fsck
Prefix: fsck

Fla: -- foo
Effect: foo is passed to the filesystem-specific checker
Page: man fsck
Prefix: fsck
Flag abbreviation: --foo (assuming foo is not a fsck option)