Labsim Section 7.4 Flashcards
(22 cards)
df
Display the free space in the partition holding the specified directory. If directory is given, the space available on all currently mounted file systems is shown. Disk space is shown in 1K blocks by default.
du
Display files and file sizes in and below a specified directory.
lsof
Display open files in the file system.
fuser
Check and optionally repair one or more Linux file systems.
e2fsck
Check and optionally repair a second extended file system (ext2) or ext2 files systems containing a journal (ext3).
debugfs
Debug the file system. The command examines and changes the state of an ext2, ext3, or ext4 file system. It allows administrators to unlink directories, change inode blocks find all inodes that point to a block, and several other similar functions
dumpe2fs
Print super block and block information for an ext2, ext3, or ext4 file system. This includes information for each sector on the partition about sector type, block ranges, inode information, free blocks, and similar information.
tune2fs
Adjust tunable file system parameters on ext2, ext3, and ext4 file systems. Some of the adjustable parameters include volume label, reserved blocks, inode sizes, and journaling. Tune2fs can also implement access control lists for individual users.
xfs_info
Display the XFS file system parameters, such as the block size and inode data structures. This is the same functionality as the xfs_growfs -n command.
xfs_metadump
Copy (dump) the metadata from an XFS file system to a file. It does not alter the file system. By default, the file names and extended attribute names are obfuscated before they are dumped.
Print blocks that are bad in the file system?
dumpe2fs -b
Display XFS system file parameters.
xfs_info; xfs_growfs -n
What option for debugfs should you use to examine the filesystem?
debugfs -c
How do you determine if any of the files in /bin are corrupt?
Use an integrity checking program to check the files in /bin.
Which e2fsck option will repair damage to the filesystem without any interaction from the user?
e2fsck -p
Which command will display all the available disk space on all partitions?
df; df -h
Which commands do you use to copy all the files from the drive /deb/sdb1, which has an XFS file system, to the /reviewxfs file?
xfs_metadump -o /dev/sdb1 /reviewxfs
Which command will show you the amount of free space in the /sales directory?
df /sales
What command and option should you use to convert the filesystem of /dev/sdb3 from ext2 to ext3 without affecting the data on the drive?
tune2fs -j /dev/sdb3
How do you check the filesystem on sda2 and fix the errors for a user who has complained of filesystem errors reported during booting?
Change to single user mode and run fsck /dev/sda2
What is the effect of tune2fs -j /dev/sdb1 command?
Converts the /dev/sdb1 device to ext3
Which command allows you to use an alternative superblock when the primary superblock has been corrupted?
e2fsck -b 16385 /dev/sda1