This tag is for questions about hard disk space usage.

learn more… | top users | synonyms (2)

46
votes
1answer
2k views

Why are there so many different ways to measure disk usage?

When I sum up the sizes of my files, I get one figure. If I run du, I get another figure. If I run du on all the files on my partition, it doesn't match what df claims is used. Why are there so many ...
41
votes
4answers
29k views

Reserved space for root on a filesystem - why?

I understand that by default, newly created filesystems will be created with 5% of the space allocated for root. I also know you can change the defined space with: tune2fs -m 1 /dev/sdXY What I'm ...
6
votes
2answers
2k views

Why is there a discrepancy in disk usage reported by df and du? [duplicate]

I have a Linux(CentOS) server, the OS+packages used around 5GB. Then, I transferred 97GB data from a Windows server to two folders on this Linux server, after calculated the disk usage, I see the ...
4
votes
2answers
5k views

ext4: How to account for the filesystem space?

I've recently formated a 1.5 TB drive with the intention of replacing ntfs with ext4. Then I noticed that the files I saved don't fit on the new partition. df: ext4 (ext3 & ext2 show the same ...
24
votes
9answers
9k views

How to understand what's taking up space?

I'm looking for a linux alternative to WinDirStat. I would like to know what is taking up space on my hard drives. A program that works on console and doesn't require a UI is preferred .
1
vote
2answers
3k views

df says I have 20G more disk space used than du. Why? [duplicate]

I used du to list all folders and sort by size, the results simply doesn't add up to how much disk space is used(using df). There's about 20G in discrepency, why? [root@xxx lib]# du --max-depth=1 -h ...
47
votes
11answers
22k views

how do you sort du output by size?

How do you sort du -sh /dir/* by size? I read one site that said use | sort -n but that's obviously not right. Here's an example that is wrong. [~]# du -sh /var/* | sort -n 0 /var/mail 1.2M ...
4
votes
2answers
500 views

What happened to my free space

On my Amazing 2GB EeePC Surf, I have no more space left! This is quite normal, and it happens every now and then. Just delete a few large, unneeded files and everything should be good, right? So I ...
3
votes
4answers
5k views

What's eating my disk space?

I'm running Linux Mint 14 Nadia. The Linux partition has 10G. When the system starts, du reports 80% usage. Then the usage slowly grows until it reaches 100% and the system becomes unusable. (It ...
8
votes
7answers
4k views

Splitting large directory tree into specified-size chunks?

I have a directory tree that I would like to back up to optical disks. Unfortunately, it exceeds the size of any one disk (it's about 60GB). I am looking for a script that would split this tree into ...
6
votes
6answers
2k views

Which installed software packages use the most disk space on Debian?

Disk space on my root partition is running low, so I want to delete some applications from the system. How can I see which software packages use the most disk space? Is it possible to view that from ...
2
votes
1answer
110 views

Why is df -h size, util and dispo not corresponding to each other

When I'm using the command "df -h" I'm having the following output : Filesystem Size Used Avail Use% Mounted on /dev/mapper/fedora-root 20G 9,4G 8,8G 52% / devtmpfs ...
16
votes
3answers
25k views

Find and remove large files that are open but have been deleted

How does one find large files that have been deleted but are still open in an application? How can one remove such a file, even though a process has it open? The situation is that we are running a ...
7
votes
3answers
3k views

How can I monitor disk I/O in a particular directory?

I've got a few processes with a known name that all write to files in a single directory. I'd like to log the number of disk block reads and writes over a period (not just file access) to test whether ...
8
votes
3answers
2k views

Directory size calculation difference

I need to get the size of directory in terminal for signing purposes. I'm using following command: du -s /path/to/dir I'm multiplying the result by traditional UNIX block size (512 bytes) and get ...
7
votes
2answers
3k views

How to `du` only the space used up by files that are not hardlinked elsewhere?

Using rsync --link-dest for space-saving snapshots, how can I figure out how much space I actually saved? Or more general: How to figure out how much space a directory uses considering only files ...
4
votes
3answers
2k views

du gives two different results for the same file

I am a graduate student of computational chemistry with access to a Linux cluster. The cluster consists of a very large (25 TB) fileserver, to which several dozen compute nodes are connected. Each ...
3
votes
4answers
9k views

In CentOS, how to find free disk space?

In CentOS and Ubuntu, how do I find out how much free disk space I have left and other disk stats like disk usage?
2
votes
5answers
573 views

How to free space on a completely full volume?

I am using Linux. And within an uncontrolled event, my 4GB system disk is full. When I try to uninstall some program by sudo apt-get purge program-name, it gives me this error: /usr/bin/mandb: can't ...
5
votes
2answers
878 views

How can I diagnose and repair missing drive space?

I have a small ext3 / partition on a 2T drive which appears to have a discrepancy in its free space. How can I determine what is causing it and how it can be fixed. After trying everything I could ...
2
votes
1answer
225 views

Managing disk space on servers

Are there any open source tools to view (and possibly restrict) disk usage per user? I need to track disk usage on a server by user.
1
vote
4answers
123 views

Linux: what is on each of my hard drives

I am about to get a new PC built by my local Expert, and will have Fedora 20 installed on it (with dual boot for a bit of Windows in case I really have to use it). It will have a new hard drive, but I ...
1
vote
1answer
2k views

Is there any way to check df -k hanging for nfs mount issues?

I am trying to write a script for such failure scenarios. In a scenario where maybe, if remote connection is lost, df waits for the remote server to respond (looks like df is hanging). I know I could ...
13
votes
7answers
53k views

Tell fs to free space from deleted files NOW

Is there a way to tell the kernel to give back the free disk space now? Like a write to something in /proc/ ? Using Ubuntu 11.10 with ext4. This is probably an old and very repeated theme. After ...
16
votes
7answers
30k views

How do I count all the files recursively through directories

I want to see how many files are in subdirectories in there subdirectories to find out where all the inode usage is on the system. Kind of like I would do this for space usage du -sh /* which will ...
8
votes
2answers
3k views

Finding all large files in the root filesystem

I have a linux server, which currently has below space usage: /dev/sda3 20G 15G 4.2G 78% / /dev/sda6 68G 42G 23G 65% /u01 /dev/sda2 30G 7.4G 21G ...
7
votes
1answer
17k views

Using --exclude with the du command

This is probably something basic but I'm not able to make it work. I'm trying to use DU to get a total size of files minus certain directories. I need to exclude one specific directory called uploads ...
7
votes
3answers
4k views

No space on device when removing a file under OpenSolaris

While trying to mount a NFS share (exported from an OpenIndiana server) on a client box, the OI server crashed. I got the black screen of death, what looked like a log dump, then the system restated. ...
7
votes
3answers
547 views

Harddrive I/O per Pid

is there any way to see the disk I/O per pid/process ? Monitorix shows me the following and correct me if I´m wrong, but it looks like that the harddrive is slowing down the whole system: UPDATE #1 ...
5
votes
2answers
2k views

Disk usage summary per user

Is there a way to get the disk usage per user under a given path? du doesn't seem to have an option to aggregate disk usage per user, and df only seems to report how much disk is left on the drive. ...
5
votes
1answer
675 views

du — ignore file not found errors

I'm trying to get the size of a folder an application is currently writing to. If I run the du command it sometimes fails with the error: du: cannot access `/a/b/a.txt': No such file or directory ...
4
votes
1answer
3k views

How do I reduce the size of locale-archive?

I have a need to reduce the size of the locale-archive file on some of my RHEL6 systems. Here is that file on my system: [root@-dev-007 locale]# ls -l total 96800 -rw-r--r--. 1 root root 99158704 ...
4
votes
1answer
3k views

When using btrfs, why “Size”, “Used” and “Avail” values from df do not match?

I have a btrfs partition. When I run df -h, it shows: Filesystem Size Used Avail Use% Mounted on /dev/sda2 113G 101G 8.3G 93% /home From Why is that? Is it because reserved space for ...
3
votes
1answer
130 views

Getting size of directories and exclude some folders

I have an directory structure like this: application1 application1_edit application2 application2_edit Is there any way to get the total size for every folder (including sub-directories) and ...
1
vote
1answer
352 views

error using “du” command

I am on the university machine trying to estimate the disk usage I have on my space I do du -csh ./ from the begining of my account, but an error is given that ./Yesterday/Yesterday is not a ...
12
votes
2answers
1k views

“ls -lh” reports total size less than sum of individual sizes

Under what circumstances would ls -lh show a total that is less than the sum of the individual files? For example: $ ls -lh /var/lib/nova/instances/_base total 100G -rw-rw-r-- 1 nova nova ...
6
votes
2answers
404 views

Mysterious write IO

I am just reviewing the disk IO of a XEN VM server. I stumbled across a DomU that has constant write traffic. To narrow that traffic further down I logged in to the DomU (CentOS 5, 64 Bit) and ...
5
votes
2answers
642 views

ext3 Filesystem shows full to most apps, but only 77% full to DF

Var is showing as full to many apps like Nagios, Puppet, and the LVM tools (pvs, vgs, etc) df -h output 6.0G 4.3G 1.4G 77% /var vgs output /var/lock/lvm/V_rootvg:aux: open failed: No space ...
5
votes
2answers
2k views

Disk space on Fedora 12

I'm using Fedora 12 on my laptop. I have 10GB disk space and 2GB of them are free. After 2-3 days uptime the space ends and I must reboot. After rebooting I get 2GB free space back. How can I prevent ...
3
votes
4answers
119 views

mount info for current directory

I can do df . to get some of the info on the mount that the current directory is in, and I can get all the info I want from mount, but get to much info. I can grep it down, but am wondering if there ...
3
votes
2answers
1k views

find the single largest file

We host a share of size 4 TB. How efficient is it to find a file with highest size. Usually we use: du -ak | sort -k1 -bn | tail -1 and it is not easy to scan through a share of such huge size and ...
3
votes
3answers
656 views

Disk size management

I am using Fedora 16. My /dev/sda2, mounted on / (root) with something like 50G got filled 100%: [foampile@~ 13:13:39]> df Filesystem 1K-blocks Used Available Use% Mounted on rootfs ...
3
votes
4answers
3k views

From df device name to physical drive name (vendor / type)

Seeing the device name by df, is it somehow possible to resolve it to the physical drive name such as vendor / type. /dev/sda3 915.4G 34.9G 880.0G 4% /share/HDA_DATA /dev/sdd3 ...
2
votes
3answers
2k views

find top 10 latest modified files

How do I get the last 10 files that were modified on my system. I have a system where its disk usage is maxed out I am not sure which files is increasing rapidly. I have a mysql instance stored on a ...
1
vote
1answer
95 views

How to find the true disk usage on my Linux box?

I have a linux box on my school's server. When I was trying to install Protocol Buffers, disk usage is reported as exceeded. So I checked my disk usage by two command on my home directory: du -h ...
1
vote
3answers
616 views

awk a specific column with unexpected line break

I can't seem to find a solution for this and it's driving me crazy. I know I can use awk to print a column(s). I'm having trouble printing a specific column though because of the way my file system is ...
0
votes
1answer
620 views

“bash: cannot create temp file for here-document: No space left on device”

My / only has about 800MB free space left. I guess it is the reason that $ convert * book.pdf Segmentation fault (core dumped) bash: cannot create temp file for here-document: No space left on device ...