[opensuse] du -shx issue/question
All, I'm running low on space on root, so I just ran cd /; du -shx * I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that. Anyone know a simple way to say "how big are the subdirectories on my root partition?" Thanks Greg -- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 11:20:50 Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?" I think "du -shx /" or "cd /; du -shx ." would do the job. -- Jim
On Thursday 07 February 2008 11:51, Jim Cunning wrote:
On Thursday 07 February 2008 11:20:50 Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
I think "du -shx /" or "cd /; du -shx ." would do the job.
Not really. You don't see directory-by-directory breakdown that way. Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Jim Cunning wrote:
On Thursday 07 February 2008 11:20:50 Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?" I think "du -shx /" or "cd /; du -shx ." would do the job.
both of those will only give the block-counts for the contents of /, but not the directories within /. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 11:20, Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Any file system mounted on a directory in / is seen by this invocation as a starting point. If you used "/" instead of "*" (along with -x) then du would not traverse into the mounted file systems. This actually turns out to be a sticky problem. The best thing I could come up with is this (I turned off wrapping to send this, but YMMV): % cd / % du -shx $(ls / |egrep -v "$(df |egrep ^/dev |sed -e 's/.* //' |tr '\n' '|' |sed -r -e 's;/;;g' -e 's;^(.*)\|$;^(\1);')") 0 acquisitions 6.7M bin 0 bittorrent 20M boot 0 data2 0 data3 0 data4 0 data5 172K dev 69M etc 169M lib 0 media 0 mnt 2.9G opt 16K p4 933M proc 0 publications 51M root 15M sbin 471M srv 0 subdomain 0 sys 722M tmp 9.1G usr 1.5G var % ls -lF / lrwxrwxrwx 1 root root 26 Sep 24 2006 acquisitions -> /repo/library/acquisitions/ drwxr-xr-x 2 root root 4096 Sep 14 20:44 bin/ lrwxrwxrwx 1 root root 16 Oct 7 2005 bittorrent -> /repo/bittorrent/ drwxr-xr-x 3 root root 4096 Oct 23 16:57 boot/ drwxrwxrwt 14 root root 4096 Dec 6 22:27 dar/ drwxr-xr-x 2 root root 6 Oct 7 2005 data2/ drwxr-xr-x 2 root root 6 Oct 7 2005 data3/ drwxr-xr-x 2 root root 6 Oct 7 2005 data4/ drwxr-xr-x 2 root root 6 Oct 7 2005 data5/ drwxr-xr-x 12 root root 16400 Feb 7 08:35 dev/ drwxr-xr-x 124 root root 12288 Feb 7 08:35 etc/ drwxr-xr-x 12 root root 4096 Aug 25 2006 home/ drwxr-xr-x 11 root root 8192 Jan 19 2007 lib/ drwxr-xr-x 6 root root 107 Feb 7 08:35 media/ drwxrwxrwt 5 root root 42 Jun 6 2007 mnt/ drwxr-xr-x 16 root root 4096 Sep 13 15:46 opt/ drwxr-xr-x 2 p4 p4 93 Oct 30 2005 p4/ dr-xr-xr-x 345 root root 0 Feb 7 08:33 proc/ lrwxrwxrwx 1 root root 26 Sep 24 2006 publications -> /repo/library/publications/ drwxrwxrwt 29 root root 936 Nov 26 19:36 repo/ drwx------ 69 root root 8192 Feb 7 11:55 root/ drwxr-xr-x 21 root root 4096 Oct 20 2005 root91/ drwxr-xr-x 27 root root 4096 Oct 19 2005 root93/ drwxr-xr-x 3 root root 12288 Aug 5 2007 sbin/ drwxr-xr-x 6 root root 50 Feb 16 2007 srv/ drwxr-xr-x 2 root root 6 Sep 9 2005 subdomain/ drwxr-xr-x 10 root root 0 Feb 7 08:33 sys/ drwxrwxrwt 127 root root 45056 Feb 7 11:45 tmp/ drwxr-xr-x 16 root root 4096 Sep 25 00:46 usr/ drwxr-xr-x 16 root root 4096 Feb 17 2006 var/ % df Filesystem 1K-blocks Used Available Use% Mounted on LABEL=Root10 35895684 15651992 20243692 44% / tmpfs 1036540 0 1036540 0% /dev/shm /dev/sda1 293008588 91737328 201271260 32% /repo /dev/sdb1 20962560 11337580 9624980 55% /root93 /dev/sdd1 11962304 6421116 5541188 54% /root91 /dev/sdd2 11961344 7177244 4784100 61% /home /dev/sdd3 11961344 1202044 10759300 11% /dar Understanding this incantation is "left as an exercise for the reader..."
Thanks Greg
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 12:20:50 Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Try: du -hx --max-depth=1 / root@shuttle:~# du -hx --max-depth=1 / 4.5M /bin 0 /dev 13M /etc 236M /lib 0 /mnt 118M /opt 0 /srv 16M /tmp 0 /sys 398M /var 2.2G /usr 36M /boot 0 /home 0 /proc 6.2M /sbin 1.1M /root 40K /media 0 /initrd 3.0G / -- Jim Barnes -- Certainly the game is rigged. Don't let that stop you; if you don't bet, you can't win. -Lazarus Long -- Linux 2.6.20-16-generic -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Thanks --max-depth is the secret. Never used that before.
Greg
On Feb 7, 2008 3:03 PM, jim barnes
On Thursday 07 February 2008 12:20:50 Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Try: du -hx --max-depth=1 /
root@shuttle:~# du -hx --max-depth=1 / 4.5M /bin 0 /dev 13M /etc 236M /lib 0 /mnt 118M /opt 0 /srv 16M /tmp 0 /sys 398M /var 2.2G /usr 36M /boot 0 /home 0 /proc 6.2M /sbin 1.1M /root 40K /media 0 /initrd 3.0G /
-- Jim Barnes -- Certainly the game is rigged. Don't let that stop you; if you don't bet, you can't win. -Lazarus Long -- Linux 2.6.20-16-generic
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-- Greg Freemyer Litigation Triage Solutions Specialist http://www.linkedin.com/in/gregfreemyer First 99 Days Litigation White Paper - http://www.norcrossgroup.com/forms/whitepapers/99%20Days%20whitepaper.pdf The Norcross Group The Intersection of Evidence & Technology http://www.norcrossgroup.com -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 12:03, jim barnes wrote:
On Thursday 07 February 2008 12:20:50 Greg Freemyer wrote:
...
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Try: du -hx --max-depth=1 / ...
Well, that's certainly far superior to that abomination I came up with!
-- Jim Barnes
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 13:16:06 Randall R Schulz wrote:
On Thursday 07 February 2008 12:03, jim barnes wrote:
On Thursday 07 February 2008 12:20:50 Greg Freemyer wrote:
...
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Try: du -hx --max-depth=1 / ...
Well, that's certainly far superior to that abomination I came up with!
That may be, but you put a lot more thought into yours. Even with my sed & awk + Mastering Regular Expressions, I wouldnt be able to work through it! :) -- Jim Barnes -- Certainly the game is rigged. Don't let that stop you; if you don't bet, you can't win. -Lazarus Long -- Linux 2.6.20-16-generic -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Feb 7, 2008 1:20 PM, Greg Freemyer
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
1. in CLI: use mc, it can calculate directory sizeds 2. use kdirstat - very good KDool for this purpose Cheers -- Svetoslav Milenov (Sunny) Even the most advanced equipment in the hands of the ignorant is just a pile of scrap. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Feb 7, 2008 3:15 PM, Sunny
2. use kdirstat - very good KDool for this purpose
KDool = KDE tool :) -- Svetoslav Milenov (Sunny) Even the most advanced equipment in the hands of the ignorant is just a pile of scrap. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 04:15:40 pm Sunny wrote:
On Feb 7, 2008 1:20 PM, Greg Freemyer
wrote: Anyone know a simple way to say "how big are the subdirectories on my root partition?"
1. in CLI: use mc, it can calculate directory sizeds 2. use kdirstat - very good KDool for this purpose
OK Sunny, I installed kdirstat. Shows a lot of stuff, including files ad how much space they take. Don't see how that helps to find out how much space that only "/" takes though. It shows everything includinng other partitions. How do you know what is ONLY on the "/" partition. Maybe I'm kinda dumb and missing something. Bob S -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Bob S wrote: > On Thursday 07 February 2008 04:15:40 pm Sunny wrote: >> On Feb 7, 2008 1:20 PM, Greg Freemyerwrote: >>> Anyone know a simple way to say "how big are the subdirectories on my >>> root partition?" >> 1. in CLI: use mc, it can calculate directory sizeds >> 2. use kdirstat - very good KDool for this purpose >> > OK Sunny, > > I installed kdirstat. Shows a lot of stuff, including files ad how much space > they take. Don't see how that helps to find out how much space that only > "/" takes though. It shows everything includinng other partitions. How do you > know what is ONLY on the "/" partition. > > Maybe I'm kinda dumb and missing something. > > Bob S > kdirstat does not normally follow mount points so if you select root you will only get a report on stuff in root partition. You will see references to mount points but no meaningful stats. HTH - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHrF+casN0sSnLmgIRAiRDAKCYpJ3V7MmMrR0I/1QI2vc7CUx6KACfVmk2 BypDiBbsfRCqJ5PFkoj0jeI= =UFBX -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 G T Smith wrote: > Bob S wrote: >> On Thursday 07 February 2008 04:15:40 pm Sunny wrote: >>> On Feb 7, 2008 1:20 PM, Greg Freemyerwrote: >>>> Anyone know a simple way to say "how big are the subdirectories on my >>>> root partition?" >>> 1. in CLI: use mc, it can calculate directory sizeds >>> 2. use kdirstat - very good KDool for this purpose >>> >> OK Sunny, > >> I installed kdirstat. Shows a lot of stuff, including files ad how much space >> they take. Don't see how that helps to find out how much space that only >> "/" takes though. It shows everything includinng other partitions. How do you >> know what is ONLY on the "/" partition. > >> Maybe I'm kinda dumb and missing something. > >> Bob S > > > kdirstat does not normally follow mount points so if you select root you > will only get a report on stuff in root partition. You will see > references to mount points but no meaningful stats. > > HTH > > BTW If you are seeing stuff in mount points Settings->Configure KDirStat->General and deselect Cross File System Boundaries - -- ============================================================================== I have always wished that my computer would be as easy to use as my telephone. My wish has come true. I no longer know how to use my telephone. Bjarne Stroustrup ============================================================================== -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (GNU/Linux) Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org iD8DBQFHrGEcasN0sSnLmgIRAhfSAJ9Wh2rFMSaCXKthb9WokoaWuq9XNwCglFdm biWCFLPfKcDkXMzMud4+eBY= =/TVe -----END PGP SIGNATURE----- -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
On Thursday 07 February 2008 22:56, Bob S wrote:
...
I installed kdirstat. Shows a lot of stuff, including files ad how much space they take. Don't see how that helps to find out how much space that only "/" takes though. It shows everything includinng other partitions. How do you know what is ONLY on the "/" partition.
If you don't need a directory-by-directory breakdown, just use df: % df -h / Filesystem Size Used Avail Use% Mounted on LABEL=Root10 35G 15G 20G 44% / (If df is given a file or directory name that is not a mount point or a mounted block device, it find which mounted file system holds that file or directory and reports on it alone.)
...
Bob S
Randall Schulz -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Not I. Looks like the -x flag on du is broken. -- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
Greg Freemyer wrote:
All,
I'm running low on space on root, so I just ran cd /; du -shx *
I was expecting the -x to cause my mount points to be ignored. No such luck and I can see that since I explicitly am including /home etc. I'm going to get results for that.
Anyone know a simple way to say "how big are the subdirectories on my root partition?"
Ah... the problem is the * You're going to have to explicitly list all of the directories that are on the root partition on the command line, WITHOUT listing any mountpoints (/home, /usr, whatever) By using *, you effectively said "stay within ANY AND ALL of the filesystems containing these directories", including any filesystem with a mountpoint in the / directory (i.e. /proc, /dev, /home, ... )
Thanks Greg
-- To unsubscribe, e-mail: opensuse+unsubscribe@opensuse.org For additional commands, e-mail: opensuse+help@opensuse.org
participants (8)
-
Aaron Kulkis
-
Bob S
-
G T Smith
-
Greg Freemyer
-
jim barnes
-
Jim Cunning
-
Randall R Schulz
-
Sunny