In order to use this software, you will have to install the btrfs-tools package with one of the following commands (depending upon your distribution): Now we’re going to examine disks that make use of the btrfs file system.
The more specific you get, the more specific your results. For example, the following command will report which subdirectories are using up the most space in a directory that was reportedly gobbling up a significant amount of storage:ĭu -a /jlwallen/media/HALEY | sort -n -r | head -n 10 You can then get more specific by running the above command on one of the reported directories. Once the report comes back ( Figure D), you’ll see how much space the top ten directories are taking up. The above command takes the results of du and pipes them to the sort command, which then pipes those results to the head command. The command for this would look something like this: The du command will do this for you (but it will take quite some time, depending on how many drives and how much data you have on your system). Let’s say you need to find the top ten largest directories on your system.
If you issue the du command with no options, it will report back every file in the working directory (as well as every file in subdirectories). What is taking up so much space? Let’s use the du command to find that out. Say, for instance, you’ve used the df command to discover that one drive is nearly full. This makes it really easy to track down those directories that are eating up the largest portion of precious storage. The du command allows you to see what directories are using your disk space.
However, have you bothered to check drive space on those servers? If not, do you have any guess as to how much free storage you have left? This is a particular task you need to know. You’ve finally mastered the tools you need to make them do what you want and have found the only maintenance they need is the regular check for updates. Your Linux servers are up and humming like champs.
Is your Linux server running out of storage space? If you're not sure how to find that out, these three commands are important to learn. How to check drive space on Linux from the command line