Skip to main content

Questions tagged [du]

"du" is the Linux command for reporting Disk Usage

2 votes
1 answer
165 views

Equivalent of “du --time -h” (or something similar) in Solaris

How can I get something similar to du -h --time at solaris?
Adam's user avatar
  • 123
3 votes
3 answers
6k views

Is there a way to force du to report a directory size (recursively) including only sizes of files?

Suppose I create a directory test/, with two files (test/a, test/b) and an inner directory test/c with a file test/c/d, like this: mkdir test cd test touch a echo 1 > a touch b echo 1 > b mkdir ...
Kipras's user avatar
  • 155
3 votes
3 answers
5k views

How do I quickly calculate the size of a directory?

I want to calculate the size of my home directory, which has a lot of sub directories. It takes about 40 seconds to run du. Is there a quicker way? $ time du -sh 5.0G . real 0m39.676s user ...
kev's user avatar
  • 12.9k
-2 votes
4 answers
532 views

choose between df and du in linux

I need to check the used space in some folders, and I need it to be fast to check because it will be inside a script. Which command should I use, "du -h" or "df -h"??
user avatar
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
3 votes
2 answers
3k views

what is faster, du or stat?

Which goes faster on Linux/Unix? du -b file.dat or: stat -c %s file.dat
Matt's user avatar
  • 767
5 votes
1 answer
2k views

Why does du -sl show different sizes for the source and result of a cp -rl?

I have used cp -rl to copy a folder. When measuring the size of the source and of the result of the copy du -sl returns slightly different sizes, even though diff confirms that their content are ...
Laurent Giroud'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
2 votes
1 answer
1k views

why does `du` not show results for all files?

I (for curiosity's sake) am running du -a inside /usr/lib/git-core and it does not show results for all the files in that directory. Why does it leave out an arbitrary set of files? this is what cd /...
Alexander Bird's user avatar
3 votes
2 answers
7k views

Equivalent of "du --max-depth=0 -h" (or something similar) in Solaris

The du command in my solaris environment has very terse help, no man page, and doesn't support the --max-depth option seen in the linux world. I want to know how much space a given directory occupies....
Brian Vandenberg'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
4 votes
4 answers
6k views

How does du determine which hard link to disregard?

We have two directories: $ ls -l total 8 drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 jeter drwxr-x--- 2 nimmy nimmy 4096 Nov 15 19:42 mariano I create one file in the first folder: $ dd if=/dev/zero ...
Belmin Fernandez's user avatar
0 votes
3 answers
2k views

How do I find out which file type is taking up the most space?

I have a zillion little files in a complex folder hierarchy; these are taking up too much space (ie. terabytes). I'd like to find out which file type (ie., .pdf etc) is taking up all the room so that ...
user avatar
4 votes
3 answers
5k views

Why do Finder and du report different file size?

I am writing a geektool 3 script to show the size of a particular VMware Fusion virtual machine. Such .vmwarevm "file" is really a packaged directory. Get Info in Finder says the file is "52.91 GB". ...
flipdoubt's user avatar
  • 257

15 30 50 per page
1
4 5 6 7
8