This tag is for questions about hard disk space usage.

learn more… | top users | synonyms (2)

3
votes
1answer
2k views

List a directory, including subdirectories, with file count and cumulative size

Is there a way to list out the content of a directory including subdirectories with a file count and cumulative size? I would like to see: Number of directories Number of sub directories number of ...
6
votes
1answer
234 views

why ls reports a huge file and du does not?

When I run arm-none-eabi-objcopy -O binary add.elf add.bin everything seems to be ok. But, later when I run ls -lh add.bin add.elf this is the output I received: -rw-r--r-- 1 david david 2,6G nov 23 ...
2
votes
2answers
236 views

du on ramdisk displays 3GB less than df

I understand there's often a some discrepancy between du and df but when I du my ramdisk it occupies 13G, whereas df shows it's using 16GB. This seems quite a big difference. Is this normal? ...
0
votes
1answer
173 views

df showing same usage statistics for different mounts

I've run the following df command on my system and get the following output: Filesystem 1K-blocks Used Available Use% Mounted on //loonie/Market ...
1
vote
1answer
58 views

How can I create a variable for just the Size, Used, and Available of df?

Say I want to create variables, one for each the size, used, and available when using df. How can I create variables for each? Is there an option that returns just one of these things? directorySize= ...
1
vote
1answer
214 views

“df -h” and “fdisk -l” in amazon server [closed]

When you do a df -h you can see: Filesystem Size Used Avail Use% Mounted on /dev/xvda1 7 . 9G 1.7G 6.2G 22% / But, when you do fdisk -l you see: Disk /dev/xvda1: 26.8 GB, 26843545600 bytes 255 ...
4
votes
2answers
325 views

Why does du report a size of 0 for some non-empty files on a HFS+ partition?

What is the explanation for the difference: $ ls -l /Applications/Safari.app/Contents/Info.plist -rw-r--r-- 1 root wheel 15730 11 jui 15:02 /Applications/Safari.app/Contents/Info.plist $ du -sh ...
0
votes
1answer
517 views

RHEL - df -h v/s graphical disk usage analyzer tool

I am trying to understand the disk usage in my RHEL system. When I run the Disk Usage Analyzer tool graphically, my screen shows the below output. However, if I run the command df -h I get the ...
0
votes
1answer
394 views

No Space left on device - Debian

when Im new to linux and try to run this below code apt-get -f install getting below error: Checking the available space df Tho output How to increase the available space in /usr path?
1
vote
3answers
311 views

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 ...
1
vote
1answer
526 views

Wrong output of du?

I think my du command is confused. % du -shc DIR ... ... 6123941496 total % du -shc DIR ... ... 6.1G total % du -sc --si DIR ... ... 6.6G total I've tried giving LANG=C and ...
3
votes
3answers
246 views

How to extract the file size with du

I'm using du to get the file size of the result archive in a packager script: > du -smh archive.zip 51M archive.zip I'd like to assign just the 51M part to a variable, to be able to print: ...
0
votes
2answers
1k views

Regarding the output of “df -h” in Linux

Regarding the output of "df -h" in Linux. [root@]# df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 193G 82G 101G 45% / tmpfs 1.9G 272K 1.9G ...
5
votes
1answer
206 views

How to monitor top applications using CPU (and IO if possible) in a graph?

I need to find what and when these applications used so much CPU (and IO if possible too). This should be in a graphic timeline like we see in GNOME System Monitor CPU History. I also want to compare ...
6
votes
5answers
249 views

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 ...
1
vote
0answers
121 views

Limiting the total size of samba's vfs_recycle by pruning oldest deleted files first

Running SerNet Samba 4.0.9 on CentOS 6.4 serving as an AD DC and fileshare for XP clients. Added recycler per the example here. My concern is that the recycle dir will eventually grow large. ...
1
vote
3answers
665 views

the difference in used hard drive space as shown by df and du is HUGE! [duplicate]

It seems that du discounts the #open files when calculating the disk usage, and this hit me when I saw that df is showing 100% usage, while du says only 40% is in use. when i looked up on this, i ...
4
votes
4answers
2k views

DU: only show folders at depth

I'm getting output from du -h like the following: 103M ./.wine/drive_c/windows/mono/mono-2.0/lib/mono 103M ./.wine/drive_c/windows/mono/mono-2.0/lib 129M ...
4
votes
1answer
2k 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 ...
1
vote
1answer
62 views

Why does Debian under-report the space available when installing Qt?

I want to install Qt on my Debian but it doesn't detect the whole free space! I tried to install it in /home/Qt but it says that only 23.87 MiB of space is available while df -h says that there is ...
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 ...
4
votes
1answer
200 views

File size shown by “du -k” is different in different file systems (PRAMFS and FLASH)

I have a file xyz.log which is of size 1.72MB. In FLASH file system: If I run du -k xyz.log output is 1761 xyz.log. I copied the same file to RAM storage and run the du -k xyz.log output is 221 ...
4
votes
2answers
3k views

/var partition gets full what's the solution?

If /var partition gets full on Production server then what's the solution ? Below are my workaround: If it is LVM Partition then we can extend it online. We can compress logs. We can remove old ...
3
votes
3answers
9k views

Shell script to send an alert mail if disk usage exceeds 90%

I am new to shell scripting and want to implement a script on my server which will automatically send email alerts if the disk usage goes over 90% and second email alert when it goes over 95%. My ...
4
votes
4answers
1k views

How to find out what is wasting space on “/”?

I can find out what is wasting space with this: du -sm * | sort +0nr | head -30 But what if "/" is filled 100%, and there are many mountpoints, ex.: /foo, /foo2, etc. How can I get a list of ...
1
vote
0answers
743 views

why is df update slow?

When I remove large files, then use df to check the disk usage, often it takes a noticeable amount of time to update the disk usage percentage appropriately. This affects several data management ...
1
vote
2answers
5k views

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 ...
4
votes
1answer
113 views

Behavior of `du` command with `-L` flag

I've noticed a strange behavior with du command when it's used with -L command line option. I'm using Slackware 14 and Coreutils 8.19. To reproduce the strange behavior, create two folders: mkdir ...
3
votes
4answers
1k views

Why is my tar file bigger than the directory backed up

This question did not help me (despite having the same title). So I post this even though this is a duplicate question. As far as I can tell, the total in du -k includes all the subdirectories and ...
1
vote
2answers
2k views

Show human readable file size in du [duplicate]

I'm using this command to determine which directory is eating my disk. du -sk * | sort -n How can I get human readable result form du for file sizes? I've checked man and all it have is -k flag ...
2
votes
1answer
137 views

apt-get purge <packages> works fine, aptitude still has <packages> marked as installed and reinstalls them

I've created a Rubygem to help with removing old kernels that have built up over years and are eating disk space. (My laptop had 19 kernels on it alone, and on a small SSD...) I want to use apt-get ...
1
vote
2answers
382 views

How can I check how much space I am allowed to use on a linux server?

I have some giant files I'd like to back up by putting them on a server I am allowed to use for such things. However, I am uncertain about how much space I am allowed to use. Is there any way of ...
1
vote
2answers
2k views

No space left on device / No Inodes free OR used / Double mounting

For about a day now I can only create/cp/mv (through terminal or various GUI programs) files on my FAT16 formatted USB stick, of about a few bytes. Doing so with larger files reports cannot create ...
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. ...
21
votes
3answers
1k views

Can the “du” program be made less aggressive?

We have a regular job that does du summaries of a number of subdirectories, picking out worst offenders, and use the output to find if there are things that are rapidly rising to spot potential ...
4
votes
4answers
91 views

Find out how much all tmp directy occupy

How can I know the size of all tmp folders for all users. I tried du -h /home/*/tmp But it did not add them all together.
1
vote
3answers
567 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
4answers
674 views

What stuff can be safely removed for disk space sake?

I am using Scientific Linux. So is there any stuff that can be safely removed from disk except /tmp?
4
votes
2answers
671 views

`du` get different results on different machines for the same folder

I have a folder(which contains a lot of sub-folders and files) on a machine, I used du -m and it shows the disk usage of all sub-folders and files, anyway, the overall disk usage is 78M I ...
2
votes
4answers
8k 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?
0
votes
5answers
525 views

How to display result of df every 30s? [duplicate]

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 ...
3
votes
1answer
2k views

What are /dev, /run and /run/shm and can I resize them?

So, I recently created a 15GB partition for Linux Mint 14. I've been working on it for a while, and I got a Low Disk Space notification. I ran df -h and this is what I'm getting: Filesystem Size ...
0
votes
2answers
455 views

'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 ...
0
votes
0answers
52 views

User mounted secondary drive as /var

I have a drive that someone else mounted using mount /dev/sdc1 /var At some point they complained that all the data was missing Now: mount /dev/sdc1 /media/testdrive df -h shows 130GB used du -h ...
4
votes
1answer
504 views

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 ...
2
votes
2answers
988 views

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, ...
0
votes
1answer
5k views

Centos freeing up disk space

I have a CentOS server running Plesk and it's run out of space on the plesk partition. I have narrowed down where a lot of the disk space is being used, but I'm not sure how to move forward. Can I ...
2
votes
2answers
202 views

decreasing “reserved block count” does not show up in df output

By default my ext3 file system had 122060 blocks(5%) reserved. I decreased this to 24412(1%), but there were no changes in df output: root@t60:~# df -P Filesystem 1024-blocks Used ...
16
votes
3answers
23k 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
4answers
4k views

How to recursively find the amount stored in directory?

I know you are able to see the byte size of a file when you do a long listing with ll or ls -l. But I want to know how much storage is in a directory including the files within that directory and the ...