UNIX Filesystems

Check

df

df -h

df -T

duf

apt install duf

Filesystem Types

To identify filesystem type use any of these commands...

df -Th

lsblk -f

mount | grep "^/dev" | column -t

mount -v

cat /etc/fstab


fsck -N /dev/sdb1

blkid /dev/sdb1

sudo file -sL /dev/sdb1

This last three are a bit pointless since you would probably need to use one of the commands above to identify the device to use anyway.

autofs

TODO

binfmt_misc

TODO

cgroup

TODO

debugfs

TODO

devpts

TODO

devtmpfs

TODO

efivarfs

TODO

ext4

The ext4 filesystem  the fourth generation of the Ext file system family. Ext was originally written by Rémy Card and released with Linux in 1992 to overcome some size limitations of the Minix file system

hugetlbfs

TODO

lofs

"An LOFS file system is a virtual file system that provides an alternate path to an existing file system. When other file systems are mounted onto an LOFS file system, the original file system does not change." (1)

mqueue

proc

TODO

pstore

TODO

rpc_pipefs

TODO

securityfs

TODO

selinuxfs

TODO

sysfs

TODO

tmpfs

"A temporary file system (TMPFS) uses local memory for file system reads and writes, which is typically much faster than reads and writes in a UFS file system. TMPFS file systems can improve system performance by saving the cost of reading and writing temporary files to a local disk or across the network. Files in TMPFS file systems do not survive across reboots or unmounts." (2)

tracefs

ufs

TODO

vfat

xfs

The XFS file system was developed in the early 1990s by SGI (Silicon Graphics, Inc.)

zfs

TODO

Shrink Filesystem

Note: You cannot shrink GFS2 or XFS filesystems

Filesystem theory

inode

The inode (index node) is a data structure in a Unix-style file system that describes a file-system object such as a file or a directory. Each inode stores the attributes and disk block locations of the object's data. File-system object attributes may include metadata (times of last change, access, modification), as well as owner and permission data. 

https://en.wikipedia.org/wiki/Inode

directory

Directories are lists of names assigned to inodes. A directory contains an entry for itself, its parent, and each of its children. 

https://en.wikipedia.org/wiki/Inode