Questions tagged [df]

37 questions
76
votes
7 answers

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 hitting 0 space only noticed when my editor couldn't…
Marcos
  • 2,275
  • 2
  • 23
  • 32
66
votes
11 answers

Finding files that use the most disk space

Is it possible to list the largest files on my hard drive? I frequently use df -H to display my disk usage, but this only gives the percentage full, GBs remaining, etc. I do a lot of data-intensive calculations, with a large number of small files…
Andrew
  • 16,315
  • 34
  • 73
  • 77
51
votes
2 answers

How to remember the difference between du and df?

du and df do rather similar things, and so I always find myself typing the wrong one. I think if I knew what "du" and "df" stands for it might make it easier to remember which to use. What is a way to differentiate between these two so I can…
Cory Klein
  • 18,391
  • 26
  • 81
  • 93
9
votes
2 answers

df command not showing correct values

This is a RHEL server, I'm running a MySQL server on it, the database and log files (however, logging is disabled) are located on the /srv directory where plenty of space is available. Recently I had a crashed table, so I tried fixing it but on the…
Muhammad Gelbana
  • 1,583
  • 8
  • 19
  • 25
9
votes
5 answers

How to display result of df every 30s?

All I want to see is the % after I issue df / every 30s but on the same line just after the previous number. So the final output would be 86% 86% 86% 87% 87% ...... Could it be one line code? Or multiple line 'program'?
Radek
  • 2,943
  • 18
  • 39
  • 52
9
votes
1 answer

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 root as wth ext2/3/4? Or is it something else? If…
sup
  • 223
  • 1
  • 2
  • 8
8
votes
1 answer

Linux tool to track directory space over time

Are there any common Linux tools that track disk space over time, not just a filesystem overall, but for example, so I could easily see which directory trees swelled up and shrunk historically? The problem happens on servers which seem to keep…
Marcos
  • 2,275
  • 2
  • 23
  • 32
6
votes
5 answers

Get filesystem name and usage with `df -h`

df -h | grep test | sed -e 's/*%.^ //g;s/.*[ ^I]//' Output: /test /test/drv0 /test/drv1 df -h | grep test | cut -d '%' -f1 | sed -e 's/*%.^ //g;s/.*[ ^I]//' Output: 10 20 15 I want to know how can I join those outputs like this: /test…
sharkguto
  • 63
  • 5
6
votes
2 answers

Is it possible to tell df to use /proc/mounts instead of /etc/mtab?

Installing gentoo in chroot I found that commands like mount and df doesn't work: they try to read file /etc/mtab (which of course is empty). Can I (for future use) setup or even recompile them so, that they won't read /etc/mtab, taking all needed…
Eddy_Em
  • 1,293
  • 1
  • 12
  • 18
6
votes
2 answers

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 left on device Can't get lock for rootvg Skipping…
Gregg Leventhal
  • 7,480
  • 19
  • 65
  • 100
5
votes
1 answer

How to do df only on root partition?

How can get df results only for / partition. The partition name/identification (/dev/sda2, /dev/cciss/c0d0p1) could vary on different computers.
Radek
  • 2,943
  • 18
  • 39
  • 52
4
votes
3 answers

What's the difference between fdisk -l and df -h?

In my ubuntu system, I want to have a look about my system disk info. When I use fdisk -l without sudo, I get nothing. But with sudo fdisk -l, I only get a device /dev/sda1, but when I use df -h, I get so many devices, like /dev/sda2, /dev/sda4 and…
wuchang
  • 7,457
  • 5
  • 16
  • 16
4
votes
2 answers

How come lvextend allocates less than the specified amount of space?

I am trying to extend a volume, let's call it /dev/vol1. I see the initial volume size is 500MB when I call: df --block-size=M /dev/vol1 then to extend it 100MB more I call: lvextend -L+100M /dev/vol1 resize2fs /dev/vol1 but when I check the size…
Garrett Hall
  • 5,121
  • 5
  • 19
  • 12
4
votes
2 answers

ext4 used space (not -m option, not deleted files)

I'm a bit puzzled about the way ext4 reports used space. On a new Debian wheezy (testing) installation, I consistently got about 1GB extra space used with a 60GB SSD, when compared to du. I then network booted that computer and mounted the SSD. The…
Jayssoneer
  • 41
  • 1
  • 3
3
votes
2 answers

'df' command doesn't list /home directory

In the book I am reading, the output of df command is shown like this: Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 15115452 5012392 9949716 34% / /dev/sda5 59631908 26545424 30008432 47% /home /dev/sda1 147764 …
its_me
  • 13,709
  • 23
  • 54
  • 52
1
2 3