Questions tagged [du]
"du" is the Linux command for reporting Disk Usage
119
questions
151
votes
4
answers
242k
views
Display each sub-directory size in a list format using one line command in Bash?
I want to get a list of the directories and their sizes in a list format like how you get when you do a ls -l.
The thing is that is there a one line command that can do this? I see others have long ...
138
votes
7
answers
97k
views
How to analyse disk usage in command line linux?
du and df are nice, but I don't know how to filter the data they provide the way I do with SequoiaView. I would like to know which are the largest folders and the largest files in a glance.
98
votes
2
answers
148k
views
du only for directories
In C-Shell, how can I get the same output as du -sh ./* but without listing the files in the root dir, i.e. just a list of subdirectories in ./ and the sizes of all their contents?
34
votes
8
answers
32k
views
du which counts number of files/directories rather than size
I am trying to clean up a hard drive which has all kinds of crap on it accumulated over the years. du has helped reduce disk usage, but the whole thing is still unwieldily not due to the total size, ...
28
votes
5
answers
42k
views
How to get the actual directory size (out of du)?
How do I get the actual directory size, using UNIX/Linux standard tools?
Alternative question: How do I get du to show me the actual directory size (not disk usage)?
Since people seem to have ...
24
votes
4
answers
30k
views
Is it possible to format ps RSS (memory) output to be more human friendly?
Executing ps ux returns a nice list of process information, easy to grep through or watch. However, there doesn't seem to be much flexibility in the memory usage output; the RSS (resident set size) is ...
23
votes
2
answers
23k
views
Only get the size from "du" command, not the folder names
I am doing an applescript that is supposed to set the size of an folder to an varible. This is the code so far:
set sizeVar to do shell script "du -skh -m /Users/JS_Admin/Desktop"
Output:
"4242 /...
22
votes
1
answer
165k
views
How to know the directory size in CENTOS [duplicate]
I have a website on my server and I own it.
The size of the website is around a whopping 170GB. This shouldn't be this much. At most, it should be around 20GB. I don't know what makes it that big.
I ...
19
votes
2
answers
5k
views
Why is a directory copied with the cp command smaller than the original?
I am tying to copy one directory with a large number of files to another destination. I did:
cp -r src_dir another_destination/
Then I wanted to confirm that the size of the destination directory is ...
16
votes
3
answers
86k
views
Total disk usage for a particular user
I would like to see the total disk usage for myself on a particular file system. I executed the command
du -h ~my_user_name
However, this lists every directory owned by my_user_name. I would like ...
13
votes
2
answers
6k
views
"du -h" with more decimal places
I'm working on a little util tool written in bash that gives me some information about a game server on Linux. For that reason I need a possibility to display the size of the file contents.
I'm doing ...
8
votes
3
answers
4k
views
Difference between df -k and du -sh
df -k
/dev/sda6 25396228 21249088 2836240 89% /export
21G used
versus
du -sh /export
3.4G /export
The 3.4G is correct because we have removed all non essential file but free ...
7
votes
3
answers
8k
views
du -x still examines mounted filesystems when using wildcards
If I try
du -s -h -x /*
it will try to examine all filesystems (real and pseudo) mounted directly under /, e.g. /dev, /proc, /sys, /run, and /home (/home is on an extra partition).
I think it comes ...
6
votes
1
answer
2k
views
Disk space analyzer that can read du output
I'm looking for a GUI program that can parse du output and show both a browseable file tree and a treemap.
So far i've tried:
xdiskusage, xdu (Linux only, ugly GUI, no tree view)
WinDirStat, ...
5
votes
3
answers
1k
views
How can I get the output of `du -c` without the word `total`?
I want to get the total size of a directory and all directories inside it.
I am using the command
du -h -c "$input_variable" | grep total
It prints the results and the word total. How do I get the ...