LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 04-29-2014, 08:29 AM   #1
akhilesh_03
LQ Newbie
 
Registered: Apr 2014
Posts: 23

Rep: Reputation: Disabled
File size


Dear All,

I have a server that is constantly losing disk space.
What is the good way to find which files size is increasing and by how much.
Will it be possible to find which files size is increased by how much??

Thanks in advance
 
Old 04-29-2014, 08:34 AM   #2
wstewart90
Member
 
Registered: May 2013
Distribution: Arch Linux
Posts: 86

Rep: Reputation: Disabled
I'd expect a linux server administrator to know how to do that already or at least find out in a more efficient manner. Try the du command with a depth of 1 and sort the output numerically. Do that from the root directory and work your way down starting with the directory taking up the most amount of space. (Hint it's usually a log file that isn't rotating frequently enough, possibly in the /var directory).

Last edited by wstewart90; 04-29-2014 at 08:38 AM.
 
Old 04-29-2014, 08:35 AM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
lsof will probably help. this is what i do from time to time:
Code:
sudo find / -type f -printf "%s \t\t%p\n" | sort -nr > ~/file-sizes.txt
sudo find / -type d -exec du -b -d 0 -S '{}' \; | sort -nr > ~/dir-sizes.txt
 
2 members found this post helpful.
Old 04-29-2014, 08:37 AM   #4
wstewart90
Member
 
Registered: May 2013
Distribution: Arch Linux
Posts: 86

Rep: Reputation: Disabled
^ Is your name Willie or are you talking about me?
 
Old 04-29-2014, 09:23 AM   #5
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,821

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
He doesn't seem to be talking about anyone. Schneidz gave the correct and fastest answer. Thats all.
 
Old 04-29-2014, 09:26 AM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,028

Rep: Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845Reputation: 845
Quote:
Originally Posted by wstewart90 View Post
^ Is your name Willie or are you talking about me?
simpsons reference.
 
Old 04-29-2014, 09:29 AM   #7
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 3,821

Rep: Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347Reputation: 1347
Nice. I didn't see your signature!


I like my OS's like this:

http://i.imgur.com/guMzXlZ.jpg
 
Old 05-02-2014, 02:57 AM   #8
akhilesh_03
LQ Newbie
 
Registered: Apr 2014
Posts: 23

Original Poster
Rep: Reputation: Disabled
Thanks a lot to you all for your replies...
 
  


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
[SOLVED] Store the size of largest file from a file/directory listing into variable SIZE lainey Linux - Newbie 3 11-15-2011 01:29 PM
Minimum file size to report a size in vsftpd log rjo98 Linux - Server 1 10-12-2011 07:24 PM
Solaris 8 - file size and partition size discrepancy noir911 Solaris / OpenSolaris 1 02-10-2009 05:43 PM
any ideas to reduce log file size or make log file size managed? George2 Programming 2 08-13-2006 07:55 AM
file system size larger than fysical size:superblock or partition table corrupt klizon Linux - General 0 06-18-2004 05:18 PM


All times are GMT -5. The time now is 02: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