LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


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

Rep: Reputation: 0
Disk Space


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?

Thanks,
penguinfeet
 
Old 08-16-2008, 01:56 PM   #2
jiml8
Senior Member
 
Registered: Sep 2003
Posts: 3,171

Rep: Reputation: 115Reputation: 115
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 02:01 PM.
 
Old 08-16-2008, 03:07 PM   #3
AwesomeMachine
Senior Member
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora
Posts: 1,829

Rep: Reputation: 257Reputation: 257Reputation: 257
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, 03:23 PM   #4
Rognon
Member
 
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 :
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.

Rognon

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

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

Rep: Reputation: 115Reputation: 115
Hmmm...

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


Reply


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 10:04 PM
add space to / when from spare space on disk ctsiow Linux - General 4 11-07-2007 08:55 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 07:19 PM
How to assign disk quota(disk space limited) to user and group. hocheetiong Linux - Newbie 1 08-24-2007 05:20 AM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 04:58 PM


All times are GMT -5. The time now is 12:37 AM.

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