![]() ![]() ![]() It will scan the directory in a cool semi-graphical (ASCII text graphics) manner and display something like this: Leave “r” out if you actually prefer that.Ī couple of other du commands you might find useful allow you to only list the files that are above a certain size or in a specified range of sizes.įor example, if you want to list only files which are bigger than 100 MB run this: -r reverses the order, since the above lists from smallest to biggest by default.-h sorts it by number in a human friendly form.The sort command takes the output of du -ch d 1 and sorts it. The | sign is the pipe sign which takes the result of the previous (du) command and passes it to the command after the pipe (AKA piping). If you want to list two levels just type -d 2 instead, and so on. d 1 option is what limits the listing to only the first level of directories in the current directory. You can then move in to /home and do the same there. For example, this command just gives you the total size of all files in the current directory:Īs you can see /home takes the most space, /root being second, and so on. Instead of doing that you can pass some options to make the results far more useful. Chances are this will be a bazillion files flying across your screen making it pretty difficult to plow through. If you simply run du it will start listing file sizes of everything under the current directory, in kilobytes. We could talk about ncdu right off the bat because it’s hands down the easiest method, but let’s cover a few useful du commands first that are good to know, and can be quite helpful as well, especially if you don’t have ncdu on your system. Finding Out What’s Taking up All The Space with duĬhecking total disk space used is easy business, but figuring out which files exactly are taking up all that space is a little trickier. Then you can drill down to the actual files. If you’ve got multiple partitions it will list them all and tell you which one is getting full. ![]() ![]() Running df is the first step to take when you’re running out of disk space and want to see what’s taking up space. 47G sure sounds a lot easier to get than 48635220, and chances are the precision of the latter number wont matter in 99% of the cases. So as you can see those are pretty big numbers, hard to wrap our heads around, and that’s because they are counted in mere kilobytes. Filesystem 1K-blocks Used Available Use % Mounted on ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2022
Categories |