LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-28-2007, 08:27 AM   #1
disruptive
Member
 
Registered: Dec 2005
Posts: 76

Rep: Reputation: 15
disk usage -du


Hi

I am having trouble getting a full account of folders that seem to be large. I am using the following command: du -s -h *.*

However I find that all directories are not listed. How do I change this so that I get all files/folders?? Or force all files/folders to be read? I cannot use a graphical environment as this is on a server.

Thanks
 
Old 11-28-2007, 08:34 AM   #2
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
Code:
man du
does a nice job of explaining it. And that's not graphical at all.
 
Old 11-28-2007, 08:41 AM   #3
disruptive
Member
 
Registered: Dec 2005
Posts: 76

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by Vincent_Vega View Post
Code:
man du
does a nice job of explaining it. And that's not graphical at all.
Had a look before posting, but could not see anything that may help show directories that are large!
 
Old 11-28-2007, 08:42 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
du -s gives only the total---how would you know what was being excluded?

du *.* lists only directories or files containing an embedded "." ---that's going to exclude a lot of things.

also, you have to have read permission on all subfolders/files in the path--in this case du tells you if it can't read something.
 
Old 11-28-2007, 08:45 AM   #5
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

I don't think du is the problem, the *.* is. That should be *

*.* will substitute to everything followed by a dot followed by everything.

du -sh * seems to be the correct command.

Hope this helps.
 
Old 11-28-2007, 08:48 AM   #6
Vincent_Vega
Member
 
Registered: Nov 2003
Location: South Jersey
Distribution: Slackware, Raspbian, Manjaro
Posts: 826

Rep: Reputation: 31
There shouldn't be any problem giving sizes for large directories.
Code:
du -hac <directory>
You can do it per directory if you feel better that way or just use '/' to give you everything. Add the 's' to that command to avoid seeing each item scroll across your screen.
 
Old 11-28-2007, 09:46 AM   #7
forrestt
Senior Member
 
Registered: Mar 2004
Location: Cary, NC, USA
Distribution: Fedora, Kubuntu, RedHat, CentOS, SuSe
Posts: 1,288

Rep: Reputation: 99
The problem is definitely with your wildcard expansion. *.* lists only the non-hidden files that contain a period in their name. If you just use * you will not get any hidden files in your list. If you just use .* you will ONLY get hidden files in your list. You need both:

Code:
du -sh * .*
HTH

Forrest
 
  


Reply



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
disk usage mouncifb Linux - Software 4 07-05-2007 03:04 PM
disk usage.... culin Programming 8 12-20-2006 07:58 AM
101% disk usage on an empty disk tsiuser Linux - Software 3 01-28-2004 06:24 PM
Disk Usage LinuxTiro Linux - Newbie 6 09-03-2003 09:12 PM
Disk Usage dvong3 Linux - Software 2 06-13-2003 12:56 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 02:05 PM.

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
Open Source Consulting | Domain Registration