RH124 Ch 15: Accessing Linux File Systems
Storage devices appear under /dev: /dev/sda, /dev/vda, /dev/nvme0n1, partitions vda1, nvme0n1p1, and LVM volumes under /dev/mapper. A file system becomes usable when it is mounted on a directory.
Look around - lsblk -f — devices, file system types, labels, UUIDs and mount points. - blkid /dev/vdd — UUID and type; blkid -s UUID -o value /dev/vdd prints only the UUID. - df -h — free space per mounted file system; du -sh /var/log — space used by a directory. - findmnt — the mount tree.
Mount by hand - mkdir /mnt/archive && mount /dev/vdd /mnt/archive (or mount UUID=… /mnt/archive). - umount /mnt/archive fails with "target is busy" if a shell sits inside it — cd away (lsof /mnt/archive shows who). - Persistent mounts go in /etc/fstab — covered in RH134.
Finding files - find / -name '.conf', -iname ignores case, -user olduser, -group, -perm -4000, -size +20M, -mmin -60, -type f. - Act on results: find / -user olduser -type f -exec cp -p {} /root/found/ \; - 2/dev/null hides the noise from /proc. - locate name searches a database (updatedb refreshes it) — fast but not live.
Exam traps: -size +20M means more than 20 MiB; quote patterns (-name '.log') so the shell does not expand them; copying found files without -p loses ownership and times.