User Tools

Site Tools


devices-and-file-system

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
devices-and-file-system [2020/05/27 10:55]
Miroslav Bernát
devices-and-file-system [2020/06/09 23:40] (current)
Miroslav Bernát
Line 49: Line 49:
 | **cat /​etc/​fstab** | lists defined file systems – a device/​partition name or UUID, mount point, FS type, mount options (see „mount“ command), backup by „dump“ program („0“ = no, „1“ = yes) and check order of the FS by „fsck“ program at the system startup („0“ = no check, „1“ = first order (for FS „/“), „2“–„9“ other orders) | | **cat /​etc/​fstab** | lists defined file systems – a device/​partition name or UUID, mount point, FS type, mount options (see „mount“ command), backup by „dump“ program („0“ = no, „1“ = yes) and check order of the FS by „fsck“ program at the system startup („0“ = no check, „1“ = first order (for FS „/“), „2“–„9“ other orders) |
 | **cat /etc/mtab** / **cat /​proc/​mounts** | lists currently mounted file systems | | **cat /etc/mtab** / **cat /​proc/​mounts** | lists currently mounted file systems |
-| **df** (<​directory/​partition/​LV>​) | prints capacity usage information for all currently mounted file systems or a specified FS/​partition in kB, **-m** in MB, **-i** lists inode information instead of block usage, **-h** well-arranged output, **-l** only local FS, **-T** prints the type of all FS, **-t** <SS> only FS of the specified type, **-P** uses the POSIX output format\\ ''​$ df -P | awk '+$5 >= 90 {print}'''​\\ (prints FS usage equal to or greater than 90 %) |+| **df** (<​directory/​partition/​LV>​) | prints capacity usage information for all currently mounted file systems or a specified FS/​partition in kB, **-m** in MB, **-i** lists inode information instead of block usage, **-h** well-arranged output, **-l** only local FS, **-T** prints the type of all FS, **-t** <SS> only FS of the specified type, **-P** uses the POSIX output format\\ ''​$ df -ml | sed '1 d' | awk '​{sum+=$3} END {printf "​%.f\n",​sum}'''​\\ (prints the total used space in MB, which is occupied by all local FS)\\ ''​$ df -P | awk '+$5 >= 90 {print}'''​\\ (prints FS usage equal to or greater than 90 %) |
 | **mkswap** <​partition/​LV>​ | creates a swap space for virtual memory, **-L** <​volume_label>​ sets a volume label | | **mkswap** <​partition/​LV>​ | creates a swap space for virtual memory, **-L** <​volume_label>​ sets a volume label |
 | **swapon** <​partition/​LV>​ | activates a swap space (to ensure permanent activation, the swap partition must be specified in ///​etc/​fstab//​ with „auto“ option), **-a** activates all swap partitions specified in ///​etc/​fstab//,​ **-s** displays active swap partitions (data from ///​proc/​swaps//​),​ **-v** detailed output (partition name, size, usage and priority) | | **swapon** <​partition/​LV>​ | activates a swap space (to ensure permanent activation, the swap partition must be specified in ///​etc/​fstab//​ with „auto“ option), **-a** activates all swap partitions specified in ///​etc/​fstab//,​ **-s** displays active swap partitions (data from ///​proc/​swaps//​),​ **-v** detailed output (partition name, size, usage and priority) |