The Shed is going Social! Join us on FaceBook and Twitter and chime in on the conversation.
|
 |
|
Dev Shed Forums
> Operating Systems
> Linux Help
|
Files space in / partition
Discuss Files space in / partition in the Linux Help forum on Dev Shed. Files space in / partition Linux Help forum discussing topics including usage, troubleshooting, modules, and distributions. Linux is an open source OS, based on UNIX.
|
|
 |
|
|
|
|

Dev Shed Forums Sponsor:
|
|
|

March 22nd, 2012, 08:30 AM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 12
Time spent in forums: 4 h 52 m 29 sec
Reputation Power: 0
|
|
|
Files space in / partition
Hi all,
I have a question on how to find out the files consuming high memory in the / partition. Have tried with other some of the
Code:
find / -name "*" -type f -xdev -ls | sort -nr +6 | head -20
or
Code:
find / -type f -ls | sort -k 7 -r -n | head -10
but I end up with the largest files in entire system rather than only for root.
Thanks!!
|

March 22nd, 2012, 08:24 PM
|
|
|
|
Take a look at the du command
Or even better, jdiskreport works fine on linux as long as you have java. With it you get a nice clickable pie chart of disk space usage.
__________________
======
Doug G
======
It is a truism of American politics that no man who can win an election deserves to. --Trevanian, from the novel Shibumi
|

March 23rd, 2012, 06:24 AM
|
 |
D'oh!
|
|
Join Date: May 2004
Location: East Coast
|
|
|
I usually use du from the cli or Baobab from my desktop. Baobab is the standard Gnome 2 utility under System Tools > Disk Usage Analyzer - I've never used jdiskreport, but from what I can tell Baobab gives the same but with a little more detail on the clickable chart. Baobab also allows you to scan remote filesystems via ssh, ftp or similar. I'm not sure if jdiskreport does this or not, but jdiskreport does run on Windows and I'm not sure if Baobab does that or not.
|

March 23rd, 2012, 02:41 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 12
Time spent in forums: 4 h 52 m 29 sec
Reputation Power: 0
|
|
Thanks All!!
I tried using du, but I am unable to sort it according to the size of the file. Can you help me with this
|

March 23rd, 2012, 03:00 PM
|
 |
Providing fuel for space ships
|
|
Join Date: Mar 2004
Location: nr Edinburgh, Scotland
|
|
Simpler to just do a: The 'S' flag sorts by file size
__________________
The No Ma'am commandments:
1.) It is O.K. to call hooters 'knockers' and sometimes snack trays
2.) It is wrong to be French
3.) It is O.K. to put all bad people in a giant meat grinder
4.) Lawyers, see rule 3
5.) It is O.K. to drive a gas guzzler if it helps you get babes
6.) Everyone should car pool but me
7.) Bring back the word 'stewardesses'
8.) Synchronized swimming is not a sport
9.) Mud wrestling is a sport
|

March 23rd, 2012, 10:23 PM
|
|
|
|
In fedora 15 you'd need ls -hlRS
on my system du puts the size output in the 1st column, you can just pipe the output to sort
|

March 25th, 2012, 07:00 AM
|
|
|
Try:
Code:
du -xaSk / | sort -nr | head -10
For the du command the -x prevents multiple filesystems being reported on, the -a causes files to be reported, the -S stops sub-directory sizes being included in the reporting and the -k forces all sizes to be in KB, to make sorting easier.
__________________
The moon on the one hand, the dawn on the other:
The moon is my sister, the dawn is my brother.
The moon on my left and the dawn on my right.
My brother, good morning: my sister, good night.
-- Hilaire Belloc
|
Developer Shed Advertisers and Affiliates
| Thread Tools |
Search this Thread |
|
|
|
| Display Modes |
Rate This Thread |
Linear Mode
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
|