Skip to main content

Questions tagged [du]

"du" is the Linux command for reporting Disk Usage

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 ...
Patoshi パトシ's user avatar
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.
Jader Dias's user avatar
  • 16.1k
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?
foglerit's user avatar
  • 1,095
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, ...
Jesse's user avatar
  • 843
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 ...
basic6's user avatar
  • 2,717
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 ...
metasoarous's user avatar
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 /...
DevRandom's user avatar
  • 395
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 ...
Yogus's user avatar
  • 1,874
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 ...
Hirurg103's user avatar
  • 313
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 ...
Alex's user avatar
  • 609
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 ...
BrainStone's user avatar
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 ...
Bernard Mwagiru's user avatar
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 ...
Markus N.'s user avatar
  • 585
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, ...
eadmaster's user avatar
  • 1,276
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 ...
user1555314's user avatar

15 30 50 per page
1
2 3 4 5
8