diff --git a/Linux/Procedural/Disk_info.md b/Linux/Procedural/Disk_info.md new file mode 100644 index 0000000..1b01e7b --- /dev/null +++ b/Linux/Procedural/Disk_info.md @@ -0,0 +1,19 @@ +--- +categories: + - Linux +tags: [systems-programming] +--- + +# Disk info routines + +## Current disk capacity + +```bash +df -h +``` + +## Disk last modified + +```bash +stat [disk_name] +``` diff --git a/Operating_Systems/Disks/Filesystems.md b/Operating_Systems/Disks/Filesystems.md index d62ce75..b374b49 100644 --- a/Operating_Systems/Disks/Filesystems.md +++ b/Operating_Systems/Disks/Filesystems.md @@ -26,7 +26,7 @@ mkfs -t ext4 /dev/sda2 ## Mounting a filesystem -We can now mount our filesystems. Whem we mount, we must specify the following criteria with the request: +We can now mount our filesystems. When we mount, we must specify the following criteria with the request: - The name of the device we want to mount. - This will be the name or the partition. However the names (`sda` etc) assigned by the OS can change. In these cases and with GPT-based partitions you can use the UUID. diff --git a/Operating_Systems/Disks/Partitions.md b/Operating_Systems/Disks/Partitions.md index 869cab5..5934264 100644 --- a/Operating_Systems/Disks/Partitions.md +++ b/Operating_Systems/Disks/Partitions.md @@ -238,4 +238,12 @@ sda 8:0 0 465.7G 0 disk └─sda2 8:2 0 365.7G 0 part ``` +#### Naming a partition + +By default each partition will have its GUID as its name, but you can add a human friendly name with: + +```bash +sudo e2label /dev/sda1 my_human_name +``` + > Whilst we have created our partitions we cannot yet mount them. This is because we have not yet set up a filesystem on the partitions. This is the next step.