Autosave: 2023-01-08 18:00:17

This commit is contained in:
thomasabishop 2023-01-08 18:00:17 +00:00
parent 42f010a570
commit dcb4276379
3 changed files with 28 additions and 1 deletions

View file

@ -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]
```

View file

@ -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.

View file

@ -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.