Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
The results are in! See what nearly 90,000 developers picked as their most loved, dreaded, and desired coding languages and more in the 2019 Developer Survey.

Questions tagged [disk-usage]

Hard disk space usage: how much space do my files take?

0
votes
1answer
22 views

Output of df contradicts output of du?

When I run the df -h command while SSH'd into my SUSE Linux box I get the following output: /dev/sdt1, with a capacity of 512G, is mounted on /usr/sap However, if I cd to usr/sap/<HANA server ID&...
0
votes
0answers
38 views

Script for server if directory sizes reaches to 20 GB [on hold]

I have written script to check the directory size and send mail to user if it crosses limit.. #!/bin/bash set -e LIMIT='8' DIR='/stage_jenkins_data/instances' MAILTO='k_vinod@idle.com' SUBJECT="$...
1
vote
1answer
68 views

How to get du -ksh working without a carriage return in shell-scripting?

Working on a script to fit a specific format. I need the results of the command to be echoed between pipes | X |. When I try to use du -ksh it always brings a carriage return. Any idea how to deal ...
-1
votes
1answer
26 views

Fastest way to calculate Disk usage for Larger directories in GB's

I have directories which are in GB's in linux file system. I want disk usage the fastest way to get the directories list. how much disk space is consuming for each directory. I used du in background ...
1
vote
1answer
40 views

Cannot do anything on Elementary OS due to disk being full

My disk became full without me noticing it so I was unable to react. Now when I come to the login screen it loops and I assume this is due to the disk being full. Pressing ctrl + alt + f1 gets me ...
2
votes
0answers
32 views

How a 95% full /home partition slows down processes?

I experienced a slowdown of some processes on my CentOS box. They did not use too much cpu cycles according to top. The only thing I have seen unusual was that my /home partition was 95% full. Could ...
2
votes
1answer
35 views

How to find space taken by a folder on disk?

I have a folder /opt/XYZ. To calculate space taken by it I use a mixture of ls -lR and awk to add space taken. It is a cumbersome way of finding disk space. I was hoping for a simpler way of finding ...
0
votes
2answers
37 views

Find out which users are hogging the most disk space on our data server

We are supposed to store our ongoing projects on a rather small (~4TB) data server. Not surprisingly, it is constantly overflowing and people need to move off less recent files manually. Is there an ...
0
votes
0answers
80 views

df - size doesn't equal used+available

I have such line when running df: /dev/sda4 47G 45G 0 / I have all those error messages that there is no space left on the device. I rebooted system and nothing changed. I ...
3
votes
2answers
298 views

Can not upgrade Kali,not enough space in /var/cache/apt/archives

I installed Kali Linux on VM VirtualBox(my host is Ubuntu 18.04). I am newbee to Kali,but the two linked questions are not related to my problem. When I try to upgrade Kali apt upgrade 926 upgraded, ...
0
votes
0answers
43 views

Find file and directory size while ignoring symlink in sub-directories

I have a directory structure where there are multiple symlinks at random depths. For illustration purpose: /fs /fs/afile /fs/blink -> /usr/local/lib /fs/cdir/cfile /fs/cdir/cdir/cdir/clink -> ...
2
votes
0answers
40 views

Strange difference of disk size

I have a Google Cloud Instance: When i check the disk space with two different command it show: df -H Filesystem Size Used Avail Use% Mounted on /dev/sda2 11G 3.1G 7.5G 30% / ...
1
vote
2answers
32 views

Printing the column names using the output of “df -h” (macOS)

I am trying to: Print the output of the command "df -h" (in macOS),but only with /dev/disk* as ouptut. I used the following command: df -h|awk -F"\t" '/\/[d-v]{3}\/[a-z]{4}[0-9]{1}[s-t]{1}[0-9]{1}/{...
0
votes
1answer
40 views

Can the phone storage device of an android phone be shown when connected to Lubuntu?

My Android phone has 1GB Phone space, and 2GB MicroSD card. When I connect the phone to my computer (Ubuntu) via a USB cable, only the 2GB MicroSD card is shown in sudo parted -l and df -l commands. ...
0
votes
1answer
22 views

searching/showing size of files

is there an easy way to look through a directory and say, for every file that starts with a-z, print the total size of those files? for example for i in {97..122}; du (something); done i.e output>>...
0
votes
1answer
44 views

Why some of my LVM filesystems use /dev/dm paths instead of /dev/mapper/ paths in df output?

All my filesystems are hosted by LVM logical volumes : $ lsblk -l | grep lvm vids_VG-iso (dm-11) 252:11 0 32G 0 lvm vids_VG-vids (dm-12) 252:12 0 586,6G 0 lvm vids_VG-vids ...
5
votes
3answers
400 views

sum all numbers from “du”

We want to calculate the first numbers that we get from du du -b /tmp/* 6 /tmp/216c6f99-6671-4865-b8bc-7205f5388752_resources 668669 /tmp/hadoop7887078727316788325.tmp 6 /tmp/hadoop-hdfs ...
0
votes
0answers
25 views

Unable to find disk space usage [duplicate]

These are the 10 heaviest directories on the system, ubuntu@ip-172-31-25-207:/$ sudo du -hs * | sort -nr | head -n10 360M lib 172M opt 172M boot 172K tmp 41M run 29G var 28M home 16M bin ...
0
votes
1answer
54 views

What is the purpose of `.Trash-1000` in my external hard drive and how can I clean it up?

I have a Western Digital external hard drive with one partition and a NTFS filesystem. In Lubuntu, under its top directory: $ sudo du -d 0 -h * | sort -h 0 temp 7.5K $RECYCLE.BIN 25K System ...
3
votes
2answers
907 views

Ubuntu: bash: cannot create temp file for here-document: No space left on device [duplicate]

I receive the error No space left on device from bash upon filename tab completion. As I try to spot what has eaten up my space, as suggested on similar question, I'm confused by df -ah results. My ...
-1
votes
1answer
86 views

Why do gparted and df -h report different size, used, and avail sizes of a partition? [closed]

$ df -h Filesystem Size Used Avail Use% Mounted on /dev/sda3 260G 16G 231G 7% / /dev/sda4 550G 323G 200G 62% /home gparted shows: Why are the size and used and avail sizes ...
0
votes
0answers
66 views

CentOS 6.6 - Another df vs du issue

I know this has been discussed many times, but I couldn't find my solution anywhere. I have a CentOS 6.6 system that has the root filesystem with 28GB used when I use df command. However, du shows me ...
1
vote
1answer
72 views

What is taking up my disk space? [duplicate]

root@ubuntu:/home/user8# df -h Filesystem Size Used Avail Use% Mounted on udev 16G 0 16G 0% /dev tmpfs 3.2G 218M 3.0G 7% ...
-1
votes
1answer
50 views

Fedora: Low disk on Filesystem root

I'm running a Fedora Workstation VM on Oracle VirtualBox. After using the VM for about a month now, I get a "Low disk on filesystem root" popup when I login. The Disk Usage Analyzer shows this: I ran ...
0
votes
3answers
54 views

How to find the first X gb of data?

I've been trying to find a way to free up some space on a drive by moving folders to another. I have a folder full of stuff I can move, doesn't need to be all of it, to free up some space. In Windows ...
0
votes
0answers
89 views

How do I find what's hogging my storage space?

I have a problem on my server. The disk is full but I can not find which directory is the responsible: /dev/sda1 97G 91G 1.9G 98% / udev 3.9G 4.0K 3.9G 1% /dev tmpfs ...
2
votes
0answers
104 views

Different mount points with df -Th and lsblk

I am wondering why the output of df -Th and lsblk commands showing different mount points for logical volume tmp. Server: RHEL v7.4 [root@mysystem ~]# df -h Filesystem Size ...
0
votes
0answers
17 views

df -h inaccurate output [duplicate]

when I hit the command dh -h in my shell I'm confused why I get an inaccurate answer for / which is 29G. by inaccurate I mean the summation of avail which is 8G and Used which is 20G is 28G but the ...
0
votes
2answers
37 views

Find out which process has data open on the hard drive that is no longer visible in the directory tree [duplicate]

On my server, the root partition is 73GB, but the disk says, it is full, although there are only about 6GB used on that device: # df -h Filesystem Size Used Avail Use% Mounted on ...
-1
votes
1answer
25 views

find command sends subfolders even with maxdepth having value of 2?

I have this bash command: find . -type d -mindepth 1 -maxdepth 2 | du -h --threshold=2KB and I got these results: r2g: the tarball folders: 8.0K ./cli r2g: the tarball folders: 24K ./dist/...
6
votes
2answers
118 views

Why does GNU Core Utilities stat (including du and ls) report the following sizes (ext4 in GNU/Linux)?

If I have the following contents in a directory: empty_dir: Empty directory. empty_file: Empty file. one_char: File consisting of one character. several_blocks: File consisting of several blocks (but ...
1
vote
1answer
24 views

How can I triage a discrepancy between my df and du output?

NOTE: I'm fully aware of these other questions on this site: Why are there so many different ways to measure disk usage? du on ramdisk displays 3GB less than df My issue shows up as follows: $ du -...
0
votes
0answers
57 views

How to calculate the throughput usage of AWS EBS volume

We have a hadoop cluster running on AWS EC2 instances. Configured 16T st1 volume in datanodes for HDFS usage. We need to understand, what is the maximum throughput hitting on this st1 volumes. Since ...
13
votes
3answers
1k views

du wrongly reports empty directory

I'm using these commands: du -sh --apparent-size ./* du -sh ./* both reporting: 4.0K ./Lightroom_catalog_from_win_backup 432M ./Lightroom catalog - wine_backup while those directories ...
3
votes
1answer
56 views

Why are du -h / du / df / df -h not refreshing when extracting a large file

I am running tar in the background, eg: tar xfvz large_file.tar.gz & It does extract my file, but when I then launch du -h, du, df or df -h, the output remains the same, and I have to wait ...
0
votes
1answer
26 views

How to measure the usage of disk cache?

Load Average itself is not very informative about the reasons of overload, so I want an additional characteristic: the percent of disk read operations that are done from cache. To measure it, I ...
0
votes
1answer
29 views

rdiff-backup needs too much space to recover from failure of previous backup?

I have quite a lot of free space (and inodes) on this filesystem, but rdiff-backup apparently runs out of space. And hence my backups are not working at the moment :-(. Why? (I wonder how much ...
0
votes
1answer
88 views

How much space does my Debian OS need

I am using a BeagleBone, with 4GB of internal emmc. When I install a Debian image on it from its site and run command df -h , the result is below. /dev/mmcblk1p1 shows that it uses 3.4G of memory. ...
0
votes
1answer
108 views

Resize partition without using LVM

I have Ubuntu 16.04 installed on remote server and I have requested another 20GB for my /dev/vda2 partition (now its 20GB), so the total size would be 40GB. Since vda2 is full of very valuable data (...
0
votes
2answers
30 views

du calculating whole directory size when we pipe the null input, how to stop it

[emdfqmm@nfwne ncndnkln]$ ll -h | grep "Oct" | grep "2018" | xargs du -ch 5.0G ./something 5.0G . 5.0G total [emdfqmm@nfwne ncndnkln]$ ll -h | grep "Oct" | grep "2018" | wc -l 0 When it got ...
0
votes
0answers
16 views

Different folder size on Windows 10 and Ubuntu 14.04 [duplicate]

I have a folder on Windows 10 on my user documents. The size of my folder content on drive C:\ is reported on Windows as: When I copy the folder to my USB drive F:\ the size is reported as: On drive ...
3
votes
1answer
1k views

df not recognizing partition being resized? [duplicate]

I've got Ubuntu 18.04 Server in Virtual Box, and once I've ran out of 10 GB of allocated space on virtual disk, I've increased the size of the virtual disk to 17 GB and resized the root partition ...
1
vote
5answers
89 views

Linux: Find the second biggest file/directory in size using commands

Introduction Find the second biggest file/directory in size using commands. What I have du /etc/ -hsx * | sort -rh | head -2 This command shows me two lines which, by the options I've chosen, gets ...
1
vote
1answer
47 views

How to erase vanished files on linux system?

I have one server at packet.net and I have attached external volume which is mounted to folder /BACKUP where I process backup. Yesterday I have received an email that there is a problem with main ...
3
votes
3answers
183 views

How can I filter read only file systems out of df output?

I use df to check if any of my mounted file systems are close to getting full. I have a cron job that sends me email if any of them are getting to be above 90% full. The problem is that some ...
-1
votes
1answer
147 views

Sort `du -sh` in an reasonable order [duplicate]

I want to check the disk usage with a readable size (option -h) [root@iz2ze9wve43n2nyuvmsfx5z /]# du -sh ./* 2>/dev/null | sort -nr 914M ./var 568K ./tmp 523M ./root 496K ./run 156M ...
1
vote
1answer
57 views

sed to remove lines starting with 'du`

I intent to check the diskspace with du -s [root@iz2ze9wve43n2nyuvmsfx5z /]# du -s /* | sort -k 1|sed "/du/d" du: cannot access ‘/proc/31265/task/31265/fd/4’: No such file or directory du: cannot ...
4
votes
3answers
84 views

unique contribution of folder to disk usage

I have a backup containing folders for daily snapshots. To save space, identical files in different snapshots are deduplicated via hard links (generated by rsync). When I'm running out of space, one ...
0
votes
1answer
174 views

What triggers journald to free up space, to comply with SystemMaxUse, SystemKeepFree?

When I do a software update (Ubuntu upgrade) and e.g. install new Linux kernels, sometimes I run out of space, which is a BAD THING. This is on Ubuntu Bionic 18.04, with systemd, so journald is ...
0
votes
1answer
147 views

Shrink disk (Thick Provisioned) size of CentOS VM and reclaim disk space on ESXi host

Our customer has VM with CentOS on ESXi host. I have to shrink the disk size of the VM and need to reclaim that free disk space back to ESXi host. Disk type on VM is Thick provisioned. How to do it?