Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This 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!


  Search this Thread
Old 08-16-2008, 10:25 AM   #1
LQ Newbie
Registered: Aug 2008
Posts: 1

Rep: Reputation: 0
Disk Space

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?

Old 08-16-2008, 12:56 PM   #2
Senior Member
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116
Look at the find command.

find -size +100000c

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.

Last edited by jiml8; 08-16-2008 at 01:01 PM.
Old 08-16-2008, 02:07 PM   #3
LQ Guru
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,513

Rep: Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007Reputation: 1007
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.
Old 08-16-2008, 02:23 PM   #4
Registered: Dec 2003
Distribution: Arch
Posts: 64

Rep: Reputation: 15
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 :
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.


Last edited by Rognon; 08-16-2008 at 02:32 PM.
Old 08-17-2008, 09:59 AM   #5
Senior Member
Registered: Jul 2007
Location: Directly above centre of the earth, UK
Distribution: SuSE, plus some hopping
Posts: 4,070

Rep: Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897Reputation: 897
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

or, for more detail about directories (folders):

(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'.)
Old 08-17-2008, 03:30 PM   #6
Senior Member
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 116Reputation: 116

Do you think we've given the OP enough different way to do similar things?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with freeing disk space on a two hard disk Fedora Core 4 box favadalikhan Linux - Server 1 04-29-2008 09:04 PM
add space to / when from spare space on disk ctsiow Linux - General 4 11-07-2007 07:55 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon Member Success Stories 1 10-18-2007 06:19 PM
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 04:20 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 03:54 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration