Linux df command summary with examples (3:44)
Videos can also be accessed from the YouTube Playlist.
Our fifty-first word, or command to memorize is
df from our category
df allows you to display file or file
Recall from the last video on
looked at permissions, timestamps and file system size, well here we'll
focus on size and usage statistics.
Before we start, it helps to think of commands as mini programs and
most follow this structure:
command -option(s) argument(s).
df command has
18 options and the argument is the file or file system
Like most commands, help is available with double-dash
-h reports in human-readable form,
like 1k for 1 kilobyte, 1M for one
megabyte, 1G for 1 gigabyte.
And to report specific items, we can use
So why is
df an important command?
Well, space is a limited resource and nobody likes to run out, so we
periodically need to check in on our allocation.
And now you know how to do that.
Okay, the best way to embed this in your memory is by typing in your own terminal window.
Find this on your Mac using a program called Terminal. On Linux use Terminal or Konsole, and currently Microsoft is adding this functionality to Windows.
Here we go. So to illustrate the difference between entering files or
file systems, let's do a quick
on the file system located in devices at
Or refer to it as our home directory using
Same thing, right? But now let's work on this because this isn't user-friendly.
Now we'll make it more friendly, using the
We all understand this 1%, but most of us think in terms of gigabytes and megabytes. Beyond that, we don't care to get more granular.
And last, let's tack on the
='size','pcent' coded up
like this for the
And voilà. The information we really care about.
Okay now you know how to use
And you know the syntax for commands, options and arguments.
One last tip about the
So I suggest starting to think of a use case, like using
df to kick off an email to users
who are nearing their capacity.
Okay, thanks for visiting today. I hope this was a helpful
introduction to the
For an overview of the 100 videos, the 8 quizzes, a cheat sheet, the categories and a Q&A section, visit:
If you learned something today, please consider subscribing to the YouTube Channel.
statcommand, hit Back.
du, click Next.