This tag is for questions about hard disk space usage.

learn more… | top users | synonyms (2)

2
votes
1answer
553 views

How to monitor per user disk usage in Linux

I have local disk with 2T capacity attached to a host. Nearly 60 user home directories are stored on this disk. Currently no disk quotas are enabled. I need monitor the disk usage of individual ...
15
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 ...
2
votes
1answer
35 views

du -s --apparent-size VS du -s

Can someone tell me the differences from: du -s dir 3705012 dir du -s --apparent-size dir 3614558 dir these dirs are inside a block device (created using cryptsetup). Or better: why I need add ...
1
vote
1answer
31 views

How to collect disk read/write activity over a given period of time?

Sometimes, especially upon login, I have a lot of disk activity. I can use iotop to see what's doing that at a given moment, but I would like to have an integral table over a given time, say the first ...
5
votes
3answers
612 views

What's the rationale to have option to use power of 1000 instead of 1024 in df?

I'm curious about df -H and df -h, then man df tells me: -h, --human-readable print sizes in human readable format (e.g., 1K 234M 2G) -H, --si likewise, but use powers of ...
2
votes
2answers
40 views

Combine output from df -h /dev/xvda1 into a single line

I want to convert the 2 line output from df -h into a single, meaningful line i.e. Take [root@ip-10-42-1-246 tmp]# df -h /dev/xvda1 Filesystem Size Used Avail Use% Mounted on /dev/xvda1 ...
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 .
12
votes
1answer
4k views

Print size of directory content with tree command in tree 1.5?

I like tree it's a nice way to display my files and the size of folders/directories. But the -h option only shows the size of the directory, not it's contents. /media/ ├── [ 16K] 64D9-E862 │   ├── ...
2
votes
2answers
670 views

root partition getting full with nfs mounted directory

I am having one nfs volume, which is mounted on one of the directory of root partition. My problem is when I checked df -ha it adds up mounted directory file content as well. Following are my ...
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 ...
0
votes
2answers
48 views

How can I recover disk space shown by the difference in disk usage between ls and du

I have a one Terabyte external hard disk drive that I intend (should have done this long ago) to use for backups, and I have done a lot of experimenting to get my mind round it. When I looked again ...
2
votes
3answers
59 views

How to know list of directories under a filesystem?

If I run sudo df -h command, I got below output: Filesystem Size Used Avail Use% Mounted on /dev/sda2 12G 9.5G 1.1G 91% / /dev/sda4 3.8G 1.5G 2.1G 41% /home ...
0
votes
1answer
62 views

How to clean up the rootfs partition or increase the size

Can't figure out how I should clean up my rootfs partition. It's 95% used, with total of 9.1G in space. Isn't that much for a root partition? This is my ouput of df -h command: /# df -h ...
2
votes
2answers
93 views

How to show only total file size of particular extension by `du` command

I have a hundreds of pdf files and html files in a directory. And I want to know total size of pdf files. By command du -ch /var/foo I can see total file size but I only need last line, the total ...
0
votes
1answer
544 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 ...
3
votes
4answers
295 views

Which directory is taking up the most space

Jenkins has stopped building and I can see from df: that /var is maxed. Following this I can see the culprit is /var/lib/jenkins 52K alternatives ... 4.0K games 2.3G jenkins <--this ...
7
votes
3answers
690 views

How to recompress 2 million gzip files without storing them twice?

I have about 2 million (60GiB) of gzipped small files and I would like to create a compressed archive containing all of them in an uncompressed version. Unfortunately, I cannot just uncompress them ...
8
votes
6answers
11k views

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

du -sh on a new directory gives different results in different locations

Here's what happened when I created a new directory and immediately ran du on it. There are no contents in this directory. me@mybox[~]$ mkdir /scratch/test2 me@mybox[~]$ du -sh /scratch/test2 4.0K ...
1
vote
0answers
44 views

What is the most elegant way to limit /tmp?

Recently I was struck by this tricky bug. In it, /tmp gets overflowed with symlinks until the system runs out of inodes. What is the best way to be sure that this can never happen again? I'd like to, ...
3
votes
1answer
82 views

Find the total disk usage not including files containing a string

I am trying to get the disk usage of the owncloud directory except not including the files and dirs containing the string nobackup in the name/dir. This is my command so far : find . -type f -not ...
1
vote
3answers
705 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 ...
0
votes
1answer
54 views

why are /media and /home /mnt/home so large?

I am trying to get hplip-3.14.10 on a desktop. I found out that the setup returns a make command failed with status code 2 which is caused by insufficient disk space. I used disk usage analyzer to ...
1
vote
2answers
46 views

du command combined with find -mmin

I want to have an idea of how much archivelogs the database is generating daily, so I did: find /u02/archivelog -mmin -1440 | du -sh and got 220GB, which is the total size of all files in that ...
0
votes
2answers
46 views

Disk usage on another filesystem

I have a directory on my ext4 partition with lots of rather small files. How can I figure out how much space would they use if I copy them to a file system with another cluster size (without actually ...
4
votes
1answer
210 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 ...
0
votes
1answer
126 views

du (disk usage) and format specifier for file/directory sizes strings?

I am really fond of du, and I often like to use it like this: $ du -hsc /var/mail/ /var/log/ 2>/dev/null 4,0K /var/mail/ 5,7M /var/log/ 5,7M total However, I'd like to be able to ...
1
vote
1answer
63 views

Format USB drive

I have a USB drive which I format with sudo mkfs.vfat -I /dev/sdb1 When I then look at the size of the USB drive with df -h, it reports its size to be 64 MB, though it should be 8 GB. What am I ...
0
votes
2answers
71 views

Different sizes after copy [duplicate]

I would like to copy for backup porposes a Linux user home directory with several GBs of data and the usual configuration files. The source directory and the backup directory should exactly have the ...
0
votes
1answer
58 views

Cannot use free space in filesystem

I want to install a program but it says that there is not enough free disk space more than 11 GB although there is. df -h shows: Filesystem Size Used Avail Use% Mounted on ...
0
votes
3answers
56 views

mysqld is not starting up anymore due filled disk [duplicate]

How to clean logs or find largest files and reduce the space? also i do not understand 1.7T is not even used in this critical moment. Mysqld is not running because 99% is used. # df -h Filesystem ...
0
votes
1answer
57 views

Filesystem and mount point

I am confused with which path should I give to store the file. host# df -h Filesystem Size Used Avail Use% Mounted on /dev/xvda2 ...
0
votes
1answer
47 views

List the size of subdirectories only considering pdf files

I've tried to list the size of subdirectories of the directory home just taking the files with pdf extension. I tried the next ls $home -d /* | xargs du -sb --exclude="!(*.pdf)" Is there any ...
2
votes
2answers
115 views

How to make system file partitions larger without reinstalling

I'm a complete beginner with any Linux distro and I recently picked up SteamOS. SteamOS I believe is Debian based. I wiped the laptop and got it installed nicely. When I started moving my music over ...
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 ...
1
vote
3answers
277 views

“grep” the available space from “df” output

Hello I need to grep the output from df. Sadly awk is not an option (even though its the easy option) here I can only use grep. Filesystem 1K-blocks Used Available Use% Mounted on none ...
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
1answer
63 views

Why are du some options not available

I have been using bash on my Synology NAS (which runs BusyBox). I recently needed to reinstall the OS. Now a script I have that uses du to generate a file containing folder sizes fails because du now ...
1
vote
2answers
112 views

How to reduce disk access?

This is a follow-up question to How to reduce temperature on a Dell XPS (L502X)?. After reading the answer, I noticed that my harddrive is spinning constantly, even when running TLP in bat-mode ...
2
votes
2answers
119 views

Debian 7.6 OpenVZ VPS claims full disk usage when it's clearly not true

I have Debian 7.6 installed on an OpenVZ VPS with 10G hard drive space, but for some reason it claims 100% is used when I'm clearly not using that much. I ran df -h to find out the following: $ df -h ...
1
vote
2answers
75 views

Ubuntu 12.04 constantly out of space [duplicate]

I am having this strange problem of my system running out of space constantly. Just yesterday I cleaned up near 15GB of space and today I see it is out of space. I really don't get it. I know some ...
3
votes
2answers
94 views

Why does du and quota results not match?

I have exceeded my disk quota on a system which I do not have root access. I tried removing old files but am still over. I tried runing du to find where I am using up all my space but it reports I am ...
1
vote
4answers
117 views

how to match the number with % from df -k command

in my bash script I want to print the use capacity of /var partition from df -k command I do the following df -k | grep var | awk '{print $5}' the problem is that sometimes "use%" number ...
3
votes
1answer
57 views

List File Space Ownership By User

I have a 4TB NFS file system that is being served from a NetApp filer. The NetApp's quota tools tell me that a certain user is using X amount of disk space in that qtree, but it isn't in "their" ...
4
votes
1answer
136 views

du command gives error and result at the same time

I would like to know the disk space of my VPS, and although for folders du works fine as $ du -sh /home/ 325M /var/ But trying to get the entire vps is giving me this result. [root@user/]# du ...
3
votes
1answer
73 views

Repeated filesystems and mount points in df output

when I type df -h to see the storage of my system the following is the result root@kch-rsp:/home/pi# df -h Filesystem Size Used Avail Use% Mounted on rootfs 13G 2.4G 10G 20% / ...
3
votes
4answers
619 views

How to get folder size ignoring hard links?

I use rsnapshot for backups, which generates a series of folders containing files of the same name. Some of the files are hard linked, while others are separate. For instance, hourly.1/file1 and ...
4
votes
2answers
6k views

How to list ALL directories according to their size? [without including the parent directory]

I have a bunch of random folders, some of them are hidden (beginning with a period). I want to list all of them, sorted by their sizes. I have something on the lines of this in mind: ls -d -1 -a */ ...
0
votes
1answer
160 views

Why does df show Available 0 when 1K-blocks minus Used is greater than 0? [duplicate]

Why does it show 0 in the available column? [root@server log]# df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 4128448 4096484 0 100% / It's ...
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 ...