Skip to main content

Questions tagged [du]

"du" is the Linux command for reporting Disk Usage

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
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
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
2 votes
2 answers
1k views

Discrepancy between df and du

I have a question pertaining the difference from 'df -h' and 'du -bs'. I have seen several questions here about it, but the issue was always that 'df -h' was reporting more used space than 'du -bs'. I ...
Jose Miguel Dores's user avatar
0 votes
3 answers
425 views

du -sh : I don't get why these two results are different

I need to know the size of a folder and some of its sub folders. So I'm trying to use the du command. I cd into the right directory and then try (in bash) : [xxx@yyy TEST]$ du -sh . 4.1G . [xxx@...
Maxx's user avatar
  • 113
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
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
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
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
4 votes
1 answer
3k views

Why is `du` on WSL acting giving a directory size greater than machine memory?

I ran into my question while trying to find out which files on my computer are taking up the most space. Here's the information on the total machine memory, found from Windows Subsystem for Linux (WSL)...
bballdave025's user avatar
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
1 vote
1 answer
4k views

Why directories size are different in ls -l output on XFS file system?

I can't understand why ls -l shows folder size less than block size. For example: [user@01 NEW]$ ls -l total 4 drwxr-xr-x 5 root root 78 Apr 22 00:43 controllers drwxr-xr-x 14 root root 4096 Apr ...
loadaverage's user avatar
1 vote
2 answers
10k views

du and ls report different directory size?

In trying to verify that a copy-operation completed successfully (or at least that it didn't skip any files), I ran du -b inside the source and destination directory and it showed a difference of ...
Markus A.'s user avatar
  • 1,041
0 votes
1 answer
2k views

I know base 2 and base 10 , MB and MiB, but i'm not understanding the byte counts shown for a directory, by du and by windows explorer

The du command shows 43G in use. I'm not sure whether that's base 2 in the sense of 2^30 or if it's base 10, in the sense of 10^9. But anyhow - Running this du command from cygwin, to see the size ...
barlop's user avatar
  • 24.3k
0 votes
1 answer
5k views

How to calculate exact size of partition and number of inodes to write a directory

I need to write a directory with files (specifically - a Linux chroot) to a file with LVM image on it. The background of task is stupid, but I want to understand what is going on for now. I calculate ...
Artalus's user avatar
  • 323

15 30 50 per page