Questions tagged [du]
72 questions
4
votes
3 answers
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
But when I check the filesize in the same catalogue…

Orphans
- 1,396
- 2
- 18
- 30
4
votes
1 answer
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 class
4.0K clearcache
388K cms
4.0K …

John
- 7,343
- 23
- 63
- 87
4
votes
1 answer
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 of no use running the scrub command after a period…

陳敬翔
- 41
- 1
- 4
4
votes
1 answer
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 been unable to find a solution.
'df -h' shows…

edwaa
- 49
- 2
4
votes
1 answer
Ubuntu "No space left on device" for /home, df shows 100% full, ds shows much, much less
Possible Duplicate:
Linux different size for df and du for root partition
On an Ubuntu 12.04 server, normal users can no longer create or add to files in /home, encountering a "No space left on device" error.
The /home directory has a capacity of…

Jon Cram
- 309
- 1
- 4
- 10
3
votes
2 answers
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 situation is that I've got some GBs "missing" that I can't…

john fish
- 61
- 1
- 3
3
votes
1 answer
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=${line//\"}
echo $hostname":" >> export_home.log
…

ujjain
- 3,983
- 16
- 53
- 91
3
votes
2 answers
Monitoring of disk usage over time - check for large variations
I'm looking for a tool that would monitor disk usage over time. What I'm looking for is folders or files that grow unexpectedly over a short period of time.
I use du , ncdu, baobab (when X is available), filelight and agedu to assess the situation…

Arthur Lutz
- 375
- 3
- 11
3
votes
1 answer
How can I calculate the total size of an extremely large number of files with a particular extension?
I've got a directory in Linux that contains a large number of files (tens of thousands), plus directories that may contain thousands of files as well.
At some point the following du command fails with an "Argument list too long" error:
du -ch…

tmcallaghan
- 289
- 3
- 13
3
votes
1 answer
Folder's taking up way more than it should
My server is chugging along with a 5GB drive, and unfortunately, it's 100% full. Going to delete some files, I notice that my Dropbox's taking up way more than it should. du -hs * returns:
[excel@catfish ~]$ du -hs Dropbox/*
11M Dropbox/Apps
33M…

excelangue
- 43
- 3
3
votes
3 answers
du displaying old results
I ran du -hs to find out how big my /home/user directory was and it reported as 18G. I cleared out almost 4G of data and ran du -hs again to find out how much space I actually saved and it still reports as 18G. --apparent-size makes it report as…

Danny Dyla
- 153
- 4
3
votes
1 answer
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?
1
The difference to How can I sort du -h output by size is
that I'm requesting an output
that includes all files and…

Henke
- 255
- 3
- 13
2
votes
2 answers
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 run and it piles up, bringing the system down to its…

Gaia
- 1,855
- 5
- 34
- 60
2
votes
2 answers
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 Taille Utilisé Dispo Uti% Monté sur
/dev/sdb1 …

chmike
- 429
- 2
- 5
- 18
2
votes
3 answers
How to find largest files in a dir - ignoring directory sizes
I want to do something like this
du -a | sort -rn | head
But I want to extract files only, ignoring directories.
To be clear, I want to traverse through all sub-directories but I don't want to find directory sizes. Just files sizes.
UPDATE
I also…

denormalizer
- 491
- 2
- 5
- 15