Skip to main content

Questions tagged [du]

"du" is the Linux command for reporting Disk Usage

1 vote
1 answer
811 views

du command not counting some subdirectories

Calling: sudo du -sh /var returns: 0B /var but calling: sudo du -sh /var/log returns: 613M /var/log Why is du not counting subdirectory despite sudo? Also some items gave Operation not permitted ...
Kevin S.'s user avatar
  • 131
1 vote
1 answer
3k views

How can I find out the capacity of the nfs mounted directory on the disk?

I cloud not find files filling the disk. df -h command print out / part usage %86 ( capacity is 15G ) but du -sh / command print out 3G. I am using nfs share on my system. the nfs mounted to /mnt. i ...
Hasan's user avatar
  • 23
0 votes
1 answer
598 views

Why do du -s * and du -s . show vastly different sizes?

I ran both du -sh . and du -sh * inside a directory, but the values returned by the second one don't add up to nearly the same value reported by the first. 5.7GB vs 1.5 GB. Why is this? Are there some ...
The Bic Pen's user avatar
4 votes
2 answers
3k views

du -h returns 512, what does it mean?

I have some files for which du -h returns 512, my understanding it is supposed to return numbers with units. What does it mean ? What is the actual disk space being used ? good file (base) -bash-4.2$ ...
Guddu's user avatar
  • 171
0 votes
0 answers
171 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 ...
U. Windl's user avatar
  • 705
0 votes
1 answer
291 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....
mcp's user avatar
  • 151
3 votes
2 answers
11k 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% ...
Harry Boy's user avatar
  • 131
1 vote
1 answer
2k 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 ...
MOBIN TM's user avatar
1 vote
0 answers
88 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 --...
Artalus's user avatar
  • 323
0 votes
2 answers
3k 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 ...
Artalus's user avatar
  • 323
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
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
1 vote
0 answers
252 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 ...
murze's user avatar
  • 171
4 votes
3 answers
2k 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 ...
Hashim Aziz's user avatar
  • 13.1k
0 votes
2 answers
73 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 -...
andykais's user avatar
  • 101

15 30 50 per page
1
2
3 4 5
8