Questions tagged [du]

The tag has no usage guidance.

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

df disk used not matching du disk used output

Others have asked this question before and I've read the answers on here and online but I'm still stumped. I'm running Ubuntu 22.04 LTS -> desktop version df -h returns this: Filesystem Size Used ...
user avatar
0 votes
0 answers
11 views

DF reports correct disk usage/free space, DU is incorrect

How is this possible? This is a practically fresh Ubuntu 20.04 server install. ncdu agrees with du in total usage. Additionally, du -a / | sort -n -r | head -n 5 reports similar disk usage. The only ...
user avatar
  • 425
1 vote
2 answers
63 views

du, df showing inconsistent hard drive usage

Ubuntu 20.04 1T built-in drive 5T Seagate Basic external USB drive Yesterday I moved a very large postgres database to an external USB drive, and then deleted the database directory from the main hard ...
user avatar
1 vote
1 answer
189 views

How to make `ncdu` show a quick summary of disk usage and exit?

I'd like to make the ncdu NCurses Disk Usage tool analyze a path, display the output, and exit, for scripting purposes. Normally it is a human-interactive tool, but I'd like to remove the human-...
user avatar
-2 votes
1 answer
70 views

Getting the total size of my five largest files in bash

I am trying to get the total size of my five largest files found in a directory but I am not getting du to work on my list. I have two ways of finding and sorting, the five largest files. #!/bin/bash ...
user avatar
  • 1
0 votes
1 answer
46 views

Find Largest Directories/Files when Drive is Full [duplicate]

When the drive of an Ubuntu 20.04 server is full, how can we find out the directories/files with the largest sizes, ranked from largest to smallest? This can allow me to find some files to delete (...
user avatar
1 vote
1 answer
148 views

Keep running out of space, where have my harddrive space gone?

I'm kind of a Linux noob and have been for almost 15 years, but I am trying to keep it active and learn more. I have a Intel NUC with 120-ish NVMe SSD storage which I'm using for a home server. It has ...
user avatar
  • 113
0 votes
0 answers
84 views

Why is my filesystem size larger than the partition size. (df vs fdisk)

So... I get that fdisk lists partition sizes, and df lists filesystem sizes, and that filesystem may use a portion of the partition and disagree on the size, but why would df list filesystem sizes ...
user avatar
  • 563
0 votes
0 answers
285 views

df, du, xfs_quota shows three different disk usage on xfs partition

I have an Ubuntu 18.04 server which is used by a backup software as a storage. The backup software saves the data to a xfs partition (/backup) which is on RAID5. The root filesystem is ext4. When I ...
user avatar
1 vote
1 answer
460 views

How to find out the size of recently downloaded files?

I have installed a bunch of development packages from the Ubuntu repositories today, and some of them seem to have had massive amounts of dependencies. Out of curiosity — and to notify those who read ...
user avatar
  • 2,933
0 votes
1 answer
616 views

du reports wrong folder size [duplicate]

I am seeing some very strange results when using du on some of my folders. For example: #cd /storage/main_folder #du -h --max-depth=2 subfolder1 | grep subfolder2 1.8G subfolder1/subfolder2/...
user avatar
  • 159
1 vote
1 answer
95 views

Can't find what is filling root

Ubuntu server 20.04.1 with Kubuntu Desktop. I have tried lots of tools like Baobab, Kdirstat, Qdirstat and Filelight. All show my root to be about 30 GB. However Dolphin(File Manager) and all the ...
user avatar
0 votes
0 answers
45 views

Discrepancy between df and du

I'm tracking down disk usage, and I am getting different results from df and du. When I installed Ubuntu, I ticked the box to encrypt my home directory, so my df -h outputs the following mounts (among ...
user avatar
2 votes
0 answers
2k views

No space left on device, even though there is

similar questions on this site did not have a solution for me. I'm developing a web app with symfony, and tried to start a local server, which resulted in a warning and didn't start anything che6yp@...
user avatar
  • 21
0 votes
0 answers
143 views

du /home | sort -nr +0 -1 | head –10

I am a little confused with this command. Can someone please explain what the output of this command is? I see it in my terminal, but I do not understand what it is showing me.
user avatar
  • 1
0 votes
0 answers
32 views

Log folder having 236 GB Free space

I have lost 236 GB because the log folder is taking so much free storage. I used du and sudo du and the 236 GB are unused. How can I fix this?
user avatar
-3 votes
2 answers
725 views

Terminal: du -sm [duplicate]

I have to complete some activity for my university and I need to know what does the command du -sm.I have already searched in many websites but i didnt find the answer. Could you help me?
user avatar
3 votes
1 answer
2k views

Print size of directory content with tree command, but exclude files from report

I often use du --max-depth=n -h | sort --human-numeric-sort Now I want to use tree, in a similar manner. I found here a partial answer tree -sh --sort=size --du where --du makes tree reporting the ...
user avatar
7 votes
2 answers
704 views

Prevent du command report inflated info about /snap directories

I have an Ubuntu 20.04 server installed on a single 8GB drive. The default installation has some "snap"s installed also. So, there are some "squashfs" file systems also reported by the df command: # ...
user avatar
  • 6,411
1 vote
1 answer
59 views

Finding directories inside a folder and deleting folder + parent if subdirectory is smaller than a certain size?

I use gmusic to order and organise my folder structure. However this means I am left with some folders that do not have any files other then normally, a image cover. I would like to sort through all ...
user avatar
4 votes
1 answer
5k views

What is difference between ls -lh and du -sh?

$ ls -lh file1.tar -rw-r--r-- 1 wnice wnice 40K Aug 6 20:41 file1.tar $ du -sh file1.tar 80K file1.tar Why is it showing different sizes of same file? Please help me understand
user avatar
1 vote
1 answer
63 views

Which folders are in /dev/sde3?

How to see which folders are in /dev/sde3 ? df -h /dev/sde3 39G 32G 4.8G 87% / Doing: cd / sudo du -d 1 -h | sort -hr Also shows me folders like: /dev/sde4 ...
user avatar
  • 850
1 vote
2 answers
158 views

Deleting empty while keeping non empty 4KB files in Ubuntu

I have a folder that contains hundreds of thousands of small .txt files of size 4kb. Some of them are totally empty while others are not. However, they all show the same size 4kb since this is the ...
user avatar
  • 488
2 votes
1 answer
538 views

File size differs between ls and ncdu

I'm a little confused. With ls -laght a file with the size 1,0T is displayed: -rw------- 1 nogroup 1,0T May 6 14:01 nextcloud-flat.vmdk with ncdu only 9,1 GB: /mnt/backup/backup/nextcloud/nextcloud-...
user avatar
0 votes
2 answers
101 views

Big file on ubuntu 16.04 virtual machine

When I execute sudo du -h --max-depth=1 I get this result: The 13g are taking the whole space of the virtual machine but when I execute ls -la the files size total size is only 96k. I'm not sure ...
user avatar
  • 3
1 vote
1 answer
73 views

Unable to free diskspace by removing files and not restarting the computer (hibernation possible)

I have a similar problem to the one mentioned here: Unable to free up space in df but I can not reboot (I have important data in the memory). The output of df -h / is: Filesystem Size Used ...
user avatar
  • 297
0 votes
4 answers
3k views

How to filter du output?

So that it won't show directories that contain an empty file named "0k" that I use as a flag ? It seems --exclude can't deal with that.
user avatar
  • 1,464
0 votes
2 answers
1k views

How can I check all used space on filesystem in linux?

I've already tried du-ch , df -h and df -h --total but it all result to their specific size of folder. Need to know how can I get the total used space in human readable form. Hoping for your help. ...
user avatar
1 vote
2 answers
102 views

Find the total space occupied by the ISO's on FS?

I want a awk script to find the sum $1 of the output of sudo find / -type f -iname *.iso -print0 | xargs -0 du Though it wouldn't be difficult to bring the output in human readable format but it ...
user avatar
4 votes
2 answers
4k views

du command - show file or folder in output?

If I run the command du -ah | sort -nr is it possible to make it show which line in the output is a file and which folder? Something like the command ls -l shows which is file and folder with d and - ...
user avatar
0 votes
1 answer
195 views

How do I refresh GT5 every X amount of seconds?

I'm using the terminal GUI program GT5, which is a "du -browser". I want to have this program either automatically refresh every 30 seconds, or run every 30 seconds, quit, then repeat. What is the ...
user avatar
0 votes
1 answer
2k views

Simple way to count disk usage after a certain date

I am looking for a simple way to count the used space in a directory (and sub-dirs) from a certain date onward. This could be done by creating an exclude file with find and parsing this to du with an ...
user avatar
  • 2,299
6 votes
1 answer
10k views

Real size of folder?

When I run du -hs Folder in the terminal I get: 118M When I run du -s Folder in the terminal I get: 120664M When I run du -h Folder in the terminal I get: 118m When I find the size through the file ...
user avatar
3 votes
3 answers
2k views

Bash Script - How can I get the size of directories in .txt file and save them into other file?

I started a few weeks with Linux bash programming, but I'm struggling with a problem: How can I get the size of multiple directories (path saved on a .txt file) and then, write into another file, the ...
user avatar
11 votes
2 answers
9k views

How to get a full size of directory without listing the files/dir within?

I am able to get a size of a directory at the end of the du -h directoryname. But is there a way to get the size without it listing the files/directories within? I'm currently doing it like this: du ...
user avatar
  • 2,707
1 vote
0 answers
393 views

keep same inodes metadata with rsync or ignore metadata with du

I'm trying to synchronize two folders from a remote computer. I want to use rsync to send the folder, and du to check if the space used is identical on the remote computer. The problem is even with a ...
user avatar
  • 351
2 votes
1 answer
2k views

Intermittent - Error: No space left on device

Having intermittent issues when starting and stopping searches. I get a Error: No space left on device intermittently. Have done some searches and most fixes are related to inodes, which you can ...
user avatar
1 vote
1 answer
185 views

Can somebody explain this changing `du` output?

Just tripped across a weird case of du. Putting arguments one way gives: $ du -s htdocs/.git/ feuerkraft/.git/ media/.git/ 40564 htdocs/.git/ 40740 feuerkraft/.git/ 204 media/.git/ Putting them ...
user avatar
  • 4,460