Junior — Middle
How can you determine the current level of disk space usage?
sobes.tech AI
Answer from AI
To determine the current level of disk space usage on Linux/Unix systems, you can use the df (disk free) command. It displays information about file systems, including total size, used, and available space.
Example command:
df -h
The -h option displays sizes in a human-readable format (e.g., MB, GB).
The output will look approximately like this:
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 50G 20G 28G 42% /
Here, you can see that a 50 GB disk is used by 20 GB, with 28 GB available, and the usage percentage is 42%.
In Windows, you can use the command wmic logicaldisk get size,freespace,caption in the command prompt or view disk properties through File Explorer.