du with head command not returning results as expected
Hello, Using "du -cks * |sort -rn |head -20" to get a list of the top 20 directories with the most amount of bloat. This has always worked well in the past, but now I get a listing saying certain directories don't exist, which is completely false. <snip> du: `User10': No such file or directory du: `User11': No such file or directory du: `User12': No such file or directory du: `User14': No such file or directory du: `User15': No such file or directory du: `User16': No such file or directory du: `User17': No such file or directory 1802956 total 1802956 User1 If I remove the head command a listing of all the directories appear as expected. Using Suse 9.3, kernel 2.6.11.4-21.11-smp. Is the 'head' command corrupt? I get he same results using another 9.3 server. Many thanks in advance. James
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 The Wednesday 2006-04-12 at 16:33 -0700, James D. Parra wrote:
Using "du -cks * |sort -rn |head -20" to get a list of the top 20
When I run "du -cks *" in my home dir it yields a syntax error on my system (it pops the help summary). I'm using 9.3. I assume the "*" gets expanded to something it doesn't like. - -- Cheers, Carlos Robinson -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.0 (GNU/Linux) Comment: Made with pgp4pine 1.76 iD8DBQFEPZ02tTMYHG2NR9URAvgVAKCX6bwJ2gHLHOVTCaz9kzUzQe3eKwCbBt6l m8s5AUBGZy84FtnAUdjnVCQ= =Ht2Z -----END PGP SIGNATURE-----
On Wednesday, April 12, 2006 @ 7:37 PM, Carlos Robinson wrote:
The Wednesday 2006-04-12 at 16:33 -0700, James D. Parra wrote:
Using "du -cks * |sort -rn |head -20" to get a list of the top 20
When I run "du -cks *" in my home dir it yields a syntax error on my system (it pops the help summary). I'm using 9.3. I assume the "*" gets expanded to something it doesn't like.
- -- Cheers, Carlos Robinson
No problem with "du -cks *" on suse 10.0 Greg Wallace
participants (3)
-
Carlos E. R.
-
Greg Wallace
-
James D. Parra