Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Hi!
I have a disk that is filling up, but I don't know what directory is currently being written to. Is there a command that will tell me which directory is being written to?
for instance, will find all files that are at least 100000 bytes large, starting at the current directory and recursively searching the subdirectories.
This will also surface directories which have become very large, perhaps due to lots and lots of files being written into them.
You can set options to look at directories only if you wish, thusly:
find -size +100000c -type d
will turn up all directory inodes that are at least 100000 bytes long (meaning a LOT of files in them).
I once found that a misconfigured postfix was sending emails to me which were not going out, and it was sending them once a minute. My hard drive space was vanishing. By the time I found the problem, there were about 2 million files in /var/spool/something or other, all to be sent to me.
I found it because of an extraordinarily large directory turned up by find.
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524
Rep:
You can also launch Konqueror file manager, right click on a directory, click properties, and it will tell you the size of the contents in each directory you do this with. This is a good starting point to find where to start looking. You can use the man page for find, and have find find the files written in the last minute. This should also give some clue.
If you're using Gnome, go to Applications -> System Tools -> Disk Usage Analyzer. This utility can scan you entire filesystem and show you the folders that take the most space.
Alternatively, you can use this command :
Code:
du -S | sort -n
This will show you all subfoders, ending with the ones taking the most space. So basically, to scan your entire filesystem, you should run it from "/". To scan your home folder, you should run it from "/home/you", etc.
It wasn't clear; maybe you wanted more of a high level view of what was happening to your partitions, in which case you should try
Code:
df
or, for more detail about directories (folders):
Code:
du
(which gives an output similar to some of the 'find' options). (And, if you are using SuSE, yast gives you nice little bars in the software installation utility, although it doesn't really have any more information than df. But it is more 'visual'.)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.