Questions tagged [du]

"du" is the Linux command for reporting Disk Usage

Filter by
Sorted by
Tagged with
0
votes
0answers
14 views

DF and DU show different usage, but LSOF shows no deleted files

I'm running Docker daemon on an RedHat host and Docker containers are being built here on a daily basis. After a couple of days the mount point reserved for the Docker daemon (/var/lib/docker) fills ...
0
votes
0answers
10 views

Where is `shared-du` (`reflink-tools`)?

The OCFS2 manual page describing reflink snapshots describes a tool named shared-du, together with examples. However I'm unable to locate that tool on the web. Where can I find it? Citing from the ...
0
votes
0answers
6 views

Installing dust using Cargo on CentOS 7

How can I fix the following error when I am trying to install dust on CentOS 7? $ cargo install du-dust Updating crates.io index Installing du-dust v0.5.4 error: failed to compile `du-dust v0.5....
0
votes
1answer
40 views

How to fix du tab alignment?

I'd like to get the du output in neat columns. This is what I get: du -sh * | sort -hr ---- 48M app 11M lib 6.7M image.jpg 1.1M image2.jpg 488K code.c 488K code.py 72K doc.txt 16K notes....
0
votes
1answer
642 views

Is it safe to delete contents of /root/.cache folder to free up space?

I need to free up disk space on my linux server. I run the df command to check space ad see that I'm using up 100% of disk space. myserver:/ # df / Filesystem 1K-blocks Used Available Use% ...
0
votes
0answers
66 views

Linux - What should I consider as Disk Space Usage (apparent size, or something else)?

I have a directory called /tmp/kafka-logs which I can see using ncdu or du command to find out my disk space usage. I am using Fedora Doplphin GUI browser on my laptop. When I see using my GUI file ...
0
votes
1answer
54 views

How to check the directory size using find command?

I would like to list the directories which is having size more than 10MB. I tried the same using find command but find command is not giving result with size and type option. It is working with any of ...
1
vote
0answers
16 views

Why `du` output / subdirectory size on disk changes after creating a file in parent directory?

╼ pwd /some/dir ╼ ls ╼ some_script.py --create centos-chroot ╼ ls centos-chroot ╼ du --block-size=1 -s centos-chroot 6320181248 ╼ fallocate -l 36613854208 largefile ╼ ls centos-chroot largefile ╼ du --...
0
votes
2answers
241 views

How to count total size of directory, and why `du` output differs between copies of directory?

Because I am clearly missing something here: $ cp -a CENTOS-chroot 1 $ cp -a CENTOS-chroot 2 $ cp -a CENTOS-chroot 3 $ cp -a CENTOS-chroot 4 $ du --block-size=1 -s 1 2 3 4 6320304128 1 ...
0
votes
1answer
450 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 ...
5
votes
3answers
923 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 ...
1
vote
0answers
66 views

How to view the disk use of a directory ignoring hard links in macOS

Using du -d 0 you can see the disk usage of the directory you're currently in. Hard links are counted as well. I'm looking for the command that does this, but does not count the size of the hard ...
1
vote
3answers
218 views

Get the total size of all files of a given extension

I'm trying to get the total size of all the JPEGs in a particular folder, but no amount of combinations of options while piping to du seems to make this work: find -type f -iname "*.jpg" | du -sch ...
0
votes
2answers
46 views

Can I give a script elevated file access and run it from my current user?

I have a script (I call it dusort.sh) I use to gauge which files are taking up the most space on my drive in a given folder. It essentially boils down to this: #!/bin/bash du --all --human-readable -...
1
vote
0answers
121 views

“du” command on Windows10 under MSYS2 gives “fts_read failed” error on USB formatted as exFAT/FAT32

I'm currently using MSYS2 on Windows10 and I tried to execute du in the MINGW64 Shell Launcher on a USB formatted as exFAT. Assuming the USB is mounted on /g/, the structure of the USB is pretty much ...
0
votes
1answer
925 views

google cloiud storage: find size of sub-folders with gsutil du?

I want to find the size of my sub-folders at the first depth in Google Cloud Storage. There is the function gsutil du, that is quite similar to du, but with some differences. I am not able to just ...
1
vote
0answers
29 views

du shows large space but inside directory it doesn't show the space

I've been trying to track down used space with du, and I'm seeing some odd behavior. [root@server01 /]# df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda2 32G 32G 190M 100% / ...
1
vote
3answers
243 views

Folder is empty, but du reports high usage

I have a 115GB partition on my hard disk (output of cgdisk /dev/sda is below): Part. # Size Partition Type Partition Name --------------------------------------------------------...
0
votes
1answer
73 views

Is there a way I can check which block of disk is really used?

I use df and du to check disk usage of centos,then I get different results from these tools. [root@localhost home]# df -Th Filesystem Type Size Used Avail Use% Mounted on /dev/mapper/...
19
votes
2answers
3k 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 ...
5
votes
1answer
248 views

Why does du -b show a different result than stat?

I've recently ran into this problem: find /tmp/tmp33hn25wv -type f -exec stat --format='%s' {} + | awk '{s+=$1} END {print s}' 10420224 du -bs /tmp/tmp33hn25wv 12198004 /tmp/tmp33hn25wv Results ...
1
vote
2answers
82 views

Running du on timeshift folders give different results

My goal is to find which files/folders take the most space in a snapshot from the backup tool timeshift but, when using du it yields different results: # du -hs * 18G 2018-09-21_16-14-57 910M ...
0
votes
1answer
2k views

use du to exclude mounted volumes but check root volume only

I am trying to check my disk usage, because my root volume is full. I'm on Centos 7.5. I thought that giving du the -x flag gets it to ignore mounted volumes. But when I check my disk usage on this ...
2
votes
1answer
990 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)...
0
votes
1answer
59 views

Unexpected behavior with -h flag passed to du

As long as I've been living in *nix world I've lived under the assumption that when a command accepted a -h flag the only thing I was changing was effectively formatting of a print statement. I don't ...
0
votes
1answer
233 views

Inconsistent output of `du` command

Why is the output of du -sch ./ not identical to du -sch ./* E.g. I ran du -sch in my user's home directory and got 51GB but running du -sch * in the same directory results in 47GB. At first I ...
2
votes
1answer
842 views

Why does “du -sh” show different folder size after copy?

I want to have a simple backup and copied all files from one folder to another. OS is Debian. When I do a du -shon the source folder I get 436G. When doing the same on the destination I only get 384G....
0
votes
1answer
358 views

how to increase the space on docker in CentOS7?

How can I increase the space on this docker? I need to transfer 30G of images into this docker to do the image processing within the docker however seems I only have 2G available $ sudo docker pull ...
0
votes
1answer
342 views

Luks encrypted external disk does not have any free space

I have a luks encrypted external disk that worked normally al the time. But suddenly, there is no free space at all. Even when I delete something with rm bigfile there is no freed space. I looked up ...
0
votes
1answer
29 views

Can I do an inclusive du, as opposed to exclusive?

I need to do a du search that only grabs certain subfolders. For example, here is the directory structure: du -b 0 ./678 21 ./679/536/Content_Repository_PoC_-_Main 73 ./...
2
votes
1answer
14k views

Excluding folders when doing du

I am trying to use du to get a list of the files/sizes on the filesystem (doing this as sudo): cd / du --exclude-from="/home" and I am getting an error message, telling me that /home is a folder. I ...
1
vote
0answers
927 views

Difference between du -sh */ and du -hd 1

I tried to find out how big each directory in my root-directory is. I cd'ed to / and did: ls | xargs du -sh the result: ... 1.9M tmp 975M usr 70G var ... Then I went to /var/www and did: ...
0
votes
1answer
66 views

How to estimate disk space used by a directory excluding certain subdirectory?

I want to estimate the amount of disk space used by a user via Apple Remote Desktop Unix command. I've been trying the following command, running as root sudo du -sh /users/ but I'd like to add the ...
2
votes
2answers
123 views

du -s /foldername gives totally different output with or without -h option

I just executed the following two commands in the terminal on my Mac (MacOS Sierra): $ sudo du -s Documents/ 11027432 Documents/ $ sudo du -hs Documents/ 5.3G Documents/ The info pane reports ...
0
votes
1answer
1k views

show file size and file owner

I am checking the file sizes of /tmp directory using du -h, but I also would like to have the ownership information of those files. There is a simple way to do this? I looked at the du manual and it ...
2
votes
1answer
509 views

How to show uncompressed total physical size in bytes of an HFS-compressed file or directory?

Case in point: Apple's TextEdit at /Applications/TextEdit.app If you calculate the physical size with echo "$(/usr/bin/du -k -d 0 /Applications/TextEdit.app | /usr/bin/awk '{print $1}') * 1024" | /...
0
votes
1answer
243 views

Is normal this /usr/share/locale/zun/LC_MESSAGES/temp file size on my server 7.3G?

I have a server on CentOS Linux mydomain.com 2.6.32-504.16.2.el6.x86_64 #1 SMP Wed Apr 22 06:48:29 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux I see the folder /usr/ with more than 18G. When I do a ...
1
vote
0answers
53 views

Summing selective du sizes output

I am trying to find out how much space is consumed in total by files exceeding 50M in size. I am able to generate a list of file sizes with the following command: find $PWD/soccer -maxdepth 50 -type ...
0
votes
1answer
794 views

Wrong available storage reported for mac os

The available space on my Macbook Air is not getting reported correctly. Hard disk capacity is 120GB out of which 17GB is getting reported as available space when I check HD info. When I see in ...
-3
votes
1answer
564 views

Does `du /` list every single file on a system? [closed]

Does du / list every single file? || Is there a better way?
0
votes
1answer
758 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 ...
3
votes
1answer
2k views

pass du (disk usage) result to a numeric variable

In a shell script, I'm looking for a way to pass the du (disk usage) result to a numeric variable, so that I cantie the execution of a shell script to the size of a specific folder. I've tried ...
2
votes
1answer
81 views

du is giving me inconsistent results depending on argument order

I'm running Darwin (Mac OS X 10.11.2 - the current version of El Capitan) on my Mac Book Pro, but this is about a standard command line utility, du. I am getting inconsistent results from du: 21:19 %...
3
votes
2answers
110 views

optimising 'du' reports on petabyte dataset?

I am trying to get a daily filesize report on a dataset of several Petabytes of genomics data. Our current report uses multiple overlapping du invocations to achieve the result, but takes over 24 ...
1
vote
0answers
618 views

MAC OS X 10.9.5 - strange result with du command

Looking for big files that I could delete in order to free up some space on my Mac (OS X 10.9.5), I came up with a big cache file: /System/Library/Caches/com.apple.coresymbolicationd/data . It was ...
0
votes
1answer
438 views

MacBook Pro takes hours to recognize FAT32 external hard drive

My MacBook pro consistently takes hours to recognize a FAT32 (ms_dos) external hard drive. I have the same issue on a 2015 MacBook Air. The drive has 500G capacity and is connected via USB (no ...
0
votes
2answers
1k views

du and df on Mac give different results

I'm trying to figure out where my HD space is going. df tells me this: bash-3.2$ df -h / Filesystem Size Used Avail Capacity iused ifree %iused Mounted on /dev/disk1 148Gi 137Gi 11Gi ...
3
votes
0answers
730 views

Different used disk space with du and quota

If I run quota I get: Disk quotas for user XXXXXX (uid xxxx): Filesystem blocks quota limit grace files quota limit grace /dev/md2 1119132* 1048576 2097152 none 6 0 ...
1
vote
1answer
582 views

Different directory size between GUI and Command Line

I got this weird size problem using Gnome: the size of Desktop directory is: 541.2 GB (right click properties) however when I run this command on a shell I get different size: du -sh Desktop/ 1.1T ...
3
votes
1answer
5k views

Faster du/stat alternative for directories

I have several very big directories and i want to know their estimated size. I use for this purpose mostly du, but it takes for each folder about 3 minutes, so i'm asking if there is an alternative to ...