Questions tagged [du]

The tag has no usage guidance.

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

I upgraded Debian 10 to Debian 11, then Debian 12. Why does previously used commands now say out of memory?

I upgraded two low end vps systems only used for mail and dns from Debian 10 to Debian 11 then to Debian 12. No issues during either upgrade for either system. I have a cron that rsync's the vmail ...
Sym's user avatar
  • 1
5 votes
1 answer
9k views

How to output all files/folders ordered by size, including hidden ones

How can I output all files/directories, ordered by size, including hidden ones (those whose name starts with a dot), all in one go? By size of a directory, I mean the sum of all file sizes in the ...
Henke - Нава́льный П с м's user avatar
0 votes
0 answers
18 views

Centos 7.4, dev/vda1 is 100% [duplicate]

My VPS on DO now has an issue of dev/vda1 is 100% since around 3 months ago, at that time, I did poweroff & reboot then disk spaced freed. But the thing rans into some bigger issue since 1 week ...
Phong Thai's user avatar
1 vote
1 answer
301 views

why are du -b and du -k different so much

I am using Ubuntu 16.04.5 LTS, and the version of du is 8.25. Now I have a question: $ du -b /var/log/lastlog 69788251412 /var/log/lastlog the size matches command ls -al. While I use du -k, it has ...
gyd's user avatar
  • 11
0 votes
2 answers
2k views

df -h shows / is 100% but du -sh * is not showing where the utulization is [duplicate]

OS: Oracle Linux 7.5 df -h keeps showing that / is 100% full but searching on / with du -sh * is not showing where that utilization could possibly be, any help and suggestions will be appreciated. I ...
Edwin Mwangi's user avatar
0 votes
1 answer
2k views

Find what is using disk space in CentOS 7 (du vs df vs lsof)

I have a server, CentOS 7, that show disk usage on DF way higher than you can see on DU and I trying to understand why DF shows 38GB used DU shows 14GB There is no mount point on any folder Checking ...
kordhaldrum's user avatar
1 vote
0 answers
187 views

What accounts for mystery hard drive space gone missing? (Difference between df and du)

To preface: there are lots of other useful questions (e.g. this and this) on possible causes for different sizes reported by df and du. None of the explanations apply to my exceedingly simple case, ...
crazygringo's user avatar
0 votes
1 answer
741 views

df shows low disk space. It includes a directory which uses mount --bind for chroot sftp

I've setup a chroot environment for sftp access (sftp only, no shell). The sftp user needs rw access to a host directory. I mounted it via /etc/fstab /var/www/html /home/sftp-user/jail/html none ...
RafaelKr's user avatar
  • 101
1 vote
1 answer
554 views

(rsync on) mounted volume: hard links seem to be preserved, but space calculated as full files

I'm trying to set up a space-efficient rotating backup scheme with rsnapshot / rsync from a server to a Hetzner storagebox. I'm having a hard time understanding how hard links on the destination are ...
rvdb's user avatar
  • 329
2 votes
0 answers
97 views

df differs from du a lot, nfsd service seems matter

I know there have been a lot of discussion on the df/du discrepancy topic. But here I’d post a special issue and ask for some hints. here is the detail( with a hardware raid5 with 6 sas disks) system ...
Guangyu wu's user avatar
0 votes
2 answers
610 views

Disk usage in LVM: Which directories contains most data?

We have following volumes: $ df -h Filesystem Size Used Avail Use% Mounted on devtmpfs 3.8G 0 3.8G 0% /dev tmpfs 3.9G 0 ...
robsch's user avatar
  • 157
6 votes
1 answer
12k views

Why does df -h still show 100% full even after deleting files?

The disk space on my Ubuntu web server, running on DigitalOcean, seems to be full. I have already found and deleted the large log file and restarted Nginx. However, it still seems like there is a ...
Andrew's user avatar
  • 3,523
1 vote
1 answer
428 views

speeding up du (maybe use ncdu) for backups with hard links

du -hc --max-depth=1 /home/back/tvppclientarea/ | sort -k2 To show the size of backup directories that use rsync and hard links. The command lists each directory and shows the amount added to the ...
Ben Edwards's user avatar
1 vote
0 answers
211 views

Why does `du` on CentOS 7 show 1 value, but it shows a different value on CentOS 8?

I just finished migrating a mail server from CentOS 7 over to CentOS 8. The mail store was in /var/vmail. The data was migrated with rsync: rsync -rltDPH /var/vmail/* root@new-hostname:/var/vmail/ I ...
David W's user avatar
  • 3,461
0 votes
2 answers
4k views

Disk usage (du) displays TB not MB

I have an issue while running du that it does not display the usage in units of Megabytes (as expected with -m switch) but TB: $ du -mhs /mnt/b 2.0T /mnt/b How can I get a more granular result?
sophros's user avatar
  • 111
7 votes
1 answer
11k views

What is right way to show folder usage in megabytes [closed]

I'm using du -bs to count folder size. du -bs /folder Result is 96342835 in Bytes... so in MB is it (/1024/1024) 91,87MB. OK, but when I use du -hs /folder Result is different. 99MB Or du -s ...
Pavel's user avatar
  • 427
0 votes
1 answer
86 views

DU shows fluctuating up then down totals during active rsync

I have 2 CentOS systems, one is rsyncing a ~411 gig directory to another. On the receiving system, I typically run du -cs * |grep total;sleep 5 as a way to monitor the background rsync operation and ...
Locane's user avatar
  • 429
1 vote
2 answers
4k views

logrotate status files extremely large

Apache2 on an Ubuntu 16.04 box was showing issues on the websites it's hosting. It was at 100% capacity. Looking further with du, The majority of the ~100gb hard drive was filled by two files in /var/...
Angelo's user avatar
  • 111
-1 votes
1 answer
407 views

Cent OS 7.2 Disk (df -h) 100% full but directory size (du -sch /* ) not [duplicate]

[root@CentOS-72-64-minimal ~]# df -h Filesystem Size Used Avail Use% Mounted on /dev/md2 204G 202G 0 100% / devtmpfs 16G 0 16G 0% /dev tmpfs 16G 0 ...
user231410's user avatar
4 votes
3 answers
1k views

du -sh * show significant more used space that ls -lah

I am having trouble with running out of diskspace of one of my clients servers. The output of the commands ls -lah in /var/lib/mysql shows: drwx------ 2 mysql mysql 16K Dec 30 2015 database_xyz ...
Orphans's user avatar
  • 1,414
-1 votes
4 answers
640 views

How to differentiate file & directory in the output of du -sh

The output of du -sh * | sort -h lists all the files and directories in sorted order based on size. But the problem is; the output doesn't differentiate the directories from files. For example: 15K ...
bprasanna's user avatar
1 vote
1 answer
202 views

Dir size increases after rsyncing to a different machine with same configuration

Have a MySQL (percona, 14.14 Distrib 5.6.28-76.1) machine with a 1TB SSD hosting around 712Gb of mysql data. MySQL has 4 databases, with, say database1, taking major space, 656Gb. Lets call this ...
Gautam Somani's user avatar
-1 votes
1 answer
351 views

How to find the missing inodes?

df -i reports Filesystem Inodes IUsed IFree IUse% Mounted on /dev/simfs 300000 250697 49303 84% / so around 250K inodes in use. du -shx --inodes / reports 70K to be sure no inodes was ...
Puggan Se's user avatar
  • 250
0 votes
1 answer
55 views

Why hasn't disk usage decreased by 6,728k after hard linking a file away?

Given this sequence of commands… $ pwd /data/backup/rsnapshot $ sudo du -csk daily.{2,3}/ruminant 1195040 daily.2/ruminant 36712 daily.3/ruminant 1231752 total $ ls -isk /data/backup/rsnapshot/...
grifferz's user avatar
  • 958
-1 votes
1 answer
59 views

Why du -sh * tells me sys has 0 size?

I use du -sh * to find out the size of folders, but the sys folder is giving me 0, and the same about any folder inside sys. find . | wc -l gives me 11k files. Do you know why and can you suggest a ...
AMDP's user avatar
  • 119
4 votes
1 answer
5k views

The file and dir sizes of du -hs * is not consistent with du -hs

When I run the bash command du -hs ., the output is 1.2G . When I run the bash command du -hs *, the output is 108K action 4.0K activate.php 8.0K browse.php 584K captcha 164K ...
learningtech's user avatar
  • 7,445
0 votes
0 answers
43 views

du and df show discrepant amounts of available disk space on my Linux server [duplicate]

I know that inodes aren't necessarily deallocated with certain removal/deletion methods that users/programs use. When inodes are still present and pointing to files that have been deleted, but two or ...
Catbird55's user avatar
  • 183
3 votes
2 answers
518 views

df shows bad information on partition usage

I've tried to deal with this for days now with no luck. In this forum and also in other ones I can see a lot of discussion about this but none of the solutions have worked for me. My current ...
john fish's user avatar
4 votes
1 answer
9k views

No more space on FreeNAS 9.3. But only half of space actually in use based on "du -sh" command

This morning I got a warning on my FreeNAS 9.3 machine about "Not enough space" warning: The capacity for the volume 'SeanVolume' is currently at 85%, while the recommended value is below 80%. It's ...
陳敬翔's user avatar
0 votes
2 answers
783 views

What are the best ways to monitor and report disk usage on solaris?

df and du provides a total view of usage but the problem with these is that they are not broken down per user. Is there a tool that does this? I found quot but that only works on ufs. Is there an ...
user55570's user avatar
  • 468
0 votes
0 answers
1k views

df and du show different size and The size of the "/platform/sun4v/lib/sparcv9/libc_psr.so.1

The server is running on Sun Sparc T5220 machine with Solaris 10 installed. I've run into the disk space problem recently. Done many research but haven't found any solution so i hope can get some help ...
ChrisT's user avatar
  • 1
1 vote
3 answers
3k views

How to find which folder is eating space fast? [duplicate]

I am running Linux server, we using this server as a samba share drive. From yesterday suddenly, one of the share drive size getting increasing (~ 100 MB every ten min). There are too many folders and ...
sridhar raj's user avatar
0 votes
1 answer
1k views

CentOS 6.5 DU and DF dont add up [duplicate]

# df -h Filesystem Size Used Avail Use% Mounted on /dev/mapper/vg_bgsvn-lv_root 28G 26G 416M 99% / tmpfs 495M 0 495M 0% /dev/shm /dev/sda1 ...
cshenderson's user avatar
0 votes
1 answer
1k views

Understanding du -sh command output

I have 1 TB of space. I am trying to find disk usage of a folder. du -sh command output 354M Arts 2.6M Digicams 308M Internet 391M Location 2.2G Media 110M Religion 4.8T Sports ...
Wazzzy's user avatar
  • 147
0 votes
1 answer
230 views

df on 7.7GB shows 400MB available while du -sh / reports 3.8GB used [duplicate]

I believe df is reporting incorrect disk usage, as I have the following problem: I deleted a few files to free up space, then run the following: $ df -H reports 7.7GB on Volume and 400MB ...
Robert's user avatar
  • 111
0 votes
1 answer
1k views

Does linux count s3fs mounts as local disk usage?

I have an s3 bucket mounted on an EC2 instance whose main disk is an EBS volume. Whenever I run something like du -h /path/to/mount it tells me the size of the folders within those. I'm wondering ...
FaCE's user avatar
  • 201
-2 votes
2 answers
280 views

df showing 28G of total space, du showing size of '/' as 400+ G

I constantly get the unable to write to * error, even though I cleaned up a bunch of space. df thinks my disk is 28G in size and 100% full after I deleted a lot of unused files: $ df -h Filesystem ...
Goro's user avatar
  • 674
6 votes
3 answers
1k views

Understanding the different directory sizes

When comparing root@debian:~# du -s /backup/test1/ 5605364 /backup/test1/ two directories with du, root@debian:/etc/init.d# du -s /data/test1/ 5605360 /data/test1/ du tells me that there is a ...
Rene's user avatar
  • 93
2 votes
2 answers
5k views

Why is DU causing high CPU usage?

On CentOS 6.5, du -sk /home and sh -c (du -sk \/home) 2>/dev/null run because a scheduled disk usage for /home, but du is causing 100% CPU usage. Plus, before it's even finished, another du gets ...
Gaia's user avatar
  • 1,895
4 votes
1 answer
2k views

Near 100% disk usage, df and du show very different results, lsof not the answer

The issue is that my CentOS 5.8 machine is telling me that I am nearly out of disk space when I am pretty confident this is not the case. I've done a fair amount of researching on this issue and have ...
edwaa's user avatar
  • 49
1 vote
0 answers
854 views

finding directory size on linux with du reports errors when files are deleted during command

I'm trying to find out the directory size of a folder to determine if a user has rights to keep writing to the folder (i.e. they are within the given limits I've imposed). I'm doing: du -sb <path&...
TheStoneFox's user avatar
0 votes
1 answer
2k views

Maximixing performance for disk usage queries in linux using du -s or df while maintaining accuracy?

I'm running a script to find out the disk usage on a wide range range of VPS (size ranging from less than 1 GB of usage to over 200 GB of usage)... I'm trying to maintain performance (EG: no extra ...
Bravo Delta's user avatar
0 votes
0 answers
33 views

No disk space on / (Debian Jessie) [duplicate]

I have a problem with disk space on my dedicated server. I have no disk space available on partition / root@server1:/# df -h Filesystem Size Used Avail Use% Mounted on /dev/root 96G ...
Terantish's user avatar
6 votes
2 answers
3k views

inconsistency between du -sh and df -h

I know this is a common occurrence when the result of du -sh is smaller than that returned by the file system with df -h. (Because some files are still open in processes etc..) But in my case I have ...
D.Mill's user avatar
  • 379
5 votes
2 answers
170 views

Next-gen filesystems: disk space usage log? [closed]

From time to time I run into problems when server hard disks (Linux) fill up quickly with lots of small files. When this happens I have to try to figure out how much space is being taken up and where ...
Tom Scrace's user avatar
2 votes
2 answers
3k views

df -h disk usage of empty disk shows 188M usage ?!

I have an empty disk mounted as /data The df -h shows me that 188M are used while a du -h shows me 4,0K. root@marc:~# du -h --max-depth=1 /data 4,0K /data root@marc:~# df -h Sys. de fichiers ...
chmike's user avatar
  • 448
13 votes
4 answers
43k views

du command takes WAY too long to run

I am running du -sh in a variety of directories to find disk hogs. I got two identical servers (Dell PE2850s), both with RHEL5 and it will take significantly longer to run du on one server over the ...
Jon Weinraub's user avatar
1 vote
2 answers
4k views

How to limit du output to a specific user?

I need to help a specific user, say alice, free up some disk space; but not all the user's files are in his home directory; many are in directories shared with other users. I'd like to have something ...
Antonis Christofides's user avatar
1 vote
1 answer
3k views

Different output by df and du [duplicate]

I have an old RHEL 5.5 Box, When I fire df -kh I see that /var is of 49 GB with 100 % usage. But then I go inside the /var cd /var and I fire du -kh I see that only total 300 MBs are used. I ...
user1263746's user avatar
3 votes
1 answer
345 views

How do I find the biggest files on multiple servers and sum up their size?

I am trying to find the biggest files in the /export/home directory and add up (sum) their sizes. Script: #!/bin/bash filename=hostnames > export_home.log while read -r -a line do hostname=${...
ujjain's user avatar
  • 4,013