Skip to Content
Ten Steps to Linux Survival
book

Ten Steps to Linux Survival

by Jim Lehmer
June 2016
Beginner content levelBeginner
72 pages
1h 6m
English
O'Reilly Media, Inc.
Content preview from Ten Steps to Linux Survival

Chapter 7. Step 7: Filesystems

You have just seen how to look at real-time system state in terms of processes, memory, and networking. Now I show how to check out the filesystems, with an eye toward disk utilization.

Displaying Filesystems

On any computer system, running out of disk space can cause many problems. On Linux, two commands are helpful in determining disk utilization.

The df (display filesystems) command shows the mounted files systems along with statistics on space usage, as you can see in Figure 7-1.

df command
Figure 7-1. df command

The main device you’re interested in is the first one, which shows /dev/vda1 mounted on /. Note the columns showing disk size, Used, Available, and Use%.

Figure 7-2 shows an example where disk utilization may be causing trouble.

df full command
Figure 7-2. df showing full disk drive

The /dev/vda1 device is 100% full!

Where Did All the Disk Space Go?

Once you’ve seen that there may be a problem with disk space, how do you find out where it is being used? You can use the du (disk utilization) command for that. By default, it descends through every directory and shows you disk usage for every subdirectory under which it is invoked (think DIR /S on CMD.EXE). That can generate a lot of output and can take a long time to run.

What we really want to do is start at the ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perfect 3 Days Linux Course

Perfect 3 Days Linux Course

Imran Afzal

Publisher Resources

ISBN: 9781492042587