Stack Exchange Network

Stack Exchange network consists of 174 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

Questions tagged [disk-usage]

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

-1
votes
0answers
13 views

ndcu doesn't show the same disk usage as df [duplicate]

my df -h output is : Filesystem Size Used Avail Use% Mounted on udev 5.9G 4.0K 5.9G 1% /dev tmpfs 1.2G 936K 1.2G 1% /run /dev/dm-0 ...
1
vote
1answer
26 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
45 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
35 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 ...
2
votes
2answers
38 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
29 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
25 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
2answers
48 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
18 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
24 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?
1
vote
1answer
42 views

How to know what consumes storage? [duplicate]

I have a Centos 7 VM and I want to know what consumes the 126G on the /dev/mapper/centos-root fs. I have 2 mount points and I unmounted them to make sure there's nothing reserving space under them ...
0
votes
1answer
42 views

Grepping on du -h for all the files that are larger than 1GB

So my disk is full, I am trying to grep for all the files larger than 1G. I tried searching for the word Sort in the man page of DU, but found nothing. du -h . | grep -E "^\d*\.\d*G" and also this. ...
1
vote
1answer
34 views

use df on distant server with SSH and get the available size

i'm trying to use this code (working on a local server) on a distant server on SSH df |tail -n +2 | awk '{if ($6 == "/var") print $2; }' my code looks like that function dst_request { # Effectue ...
1
vote
3answers
61 views

How much space is available?

The question says Remove the entire git directory (it is not used in our tutorials). Now repeat the above calculation for disk space, but this time give the answer in blocks. I successfully deleted ...
6
votes
1answer
893 views

Why is /home twice as big as expected?

I was checking my disk usage today, and ran the following commands (using sudo so I didn't get "permission denied") $ du -hs /home 26G /home $ ls -la /home total 24 drwxr-xr-x 4 root root ...
3
votes
4answers
476 views

cut / grep df -h [duplicate]

How can I get the mount point "3.1T" under the column " Avail" (using grep or cut)? Filesystem Size Used Avail Use% Mounted on vstorage://cluster07 4.0T ...
0
votes
0answers
17 views

How to show dir sizes for a shared dir on a VM

I'm using an Ubuntu VM using Parallels for Mac. When I run du -d1 in /media/psf/share (which is the shared dir from the Mac host), everything shows as 0. Is there a way to have du return the actual ...
0
votes
1answer
53 views

df du hardlinks and space reclaimation

I am really confused on how to build an understanding around hardlinks. I work with a DB hosted on Linux. The Db in order to take backups creates hardlinks to data files in a different directory. ...
0
votes
0answers
32 views

Formating the wrong partition on Linux Debian

I have, mistakenly, deleted "/dev/mmcblk0p5". I connected to my server(Debian 9) via browser with a new feature I had installed "open media vault" to create/manage a NAS, then I saw two patitions in ...
1
vote
1answer
30 views

df size of partition and dd-ed image with sparse flag does not match

The size of a partition is close to 2Gb and the actual used size is 1.5Gb, I am trying to make image of this partition using dd with conv=sparse flag enabled. The generated image by dd is of size 1....
0
votes
0answers
40 views

du disk usage and apparent size huge difference (Terabytes vs Kilobytes)

I know that when using du utility, disk usage is bigger than apparent size because of the blocks that are not fully used. But here there is something else. On a particular folder, du without apparent-...
0
votes
0answers
21 views

Disk wiped but some space is still not freed?

I just erased my 1TB HDD with GParted but there is still 60GB in use. I tried to wipe the disk multiple times but it does nothing. From GParted: There is 15.70Gio in use after the wiped At the ...
0
votes
1answer
56 views

Disk usage of all the files in a directory

I am trying to get the disk usage of all the files present in a particular directory using the following commands and I am getting different answers for both. Could anyone explain why? find ./ -type ...
1
vote
1answer
640 views

Should I use XFS or ext4? [closed]

Context I'm setting up a system for an off-site backup. It is a Raspberry Pi connected to two external hard disks. The data is written on both disks in parallel (this is not RAID 1, but two disks on ...
2
votes
0answers
35 views

Why does an SCPed git repo have a different size?

I've SCPed a git repo from a machine running Ubuntu to a machine running Centos (there would be issues with pushing currently uncommitted changes into the repo and cloning it on the new machine), but ...
0
votes
1answer
124 views

“No space left on device” despite 70GB free; can't create any files larger than 8.0MiB on iPad [closed]

OK so this is on an iPad Pro but I'm asking you guys because this is about the underlying Unix system behind iOS/OS X, not really iPad specific. (And yes I spent hours reading all relevant ...
-2
votes
1answer
51 views

du reports directory size as much smaller than the sum of its contents

I have a directory ~/D that I'd like to find the size of. using du -c ~/D/* gives 26880. However, if I run ls -l ~/D, then I can clearly see that the individual files add up to much more than 26880. ...
-1
votes
1answer
73 views

ls and du disagree about file size, by a few orders of magnitude

Does anyone understand why I might get these results? Note the discrepency in file size between the two commands below: $ ls -lh gauss_landmarks_0000.npy -rw-rw-r-- 1 dparks dparks 1.1G Aug 16 12:43 ...
0
votes
2answers
25 views

How to allocate more memory to main partition?

I'm trying to setup a raspberry pi 3 for linux use, and I'm running into trouble with partitions. I'm very new to linux use and disk management so this is probably my misunderstanding. I don't have ...
0
votes
2answers
58 views

df (with options) leaves zombie process

OS = CentOS 7.3 If I try to run the 'df' command on this server with an option (e.g. -h -l) it hangs and leaves a zombie process. I cannot Ctrl+z out back to a prompt. If I run 'df' against specific ...
1
vote
0answers
27 views

How to See Bound Folders and Release Them

This morning I noticed someone had stuck a USB Drive in the back of the server. (I'll have to end that practice later). For some reason CentOS 7 mounted that disk /dev/sdc1 under /run/media//. I also ...
1
vote
0answers
32 views

.git takes MORE space after gc

$ du -ks .git 784113 .git $ git gc Counting objects: 30237, done. Delta compression using up to 4 threads. Compressing objects: 100% (9165/9165), done. Writing objects: 100% (30237/30237), done. ...
1
vote
1answer
585 views

df hangs and I have no idea why

[backstory] I've got a CentOS 7.5.1804 mail server (postfix/dovecot) that seems to be working, however when I added a new email client, it didn't create the mail folder for the user [/backstory] I ...
0
votes
2answers
41 views

Calculating directory size without subdirectories bind-mounted from the same device

I want to calculate a directory size with all its subdirectories. But I had made some of the subdirectories to mount from a mount point. (using mount -B/--bind) when I use du -hks the returned size ...
0
votes
2answers
48 views

Generic tool to order by size in linux, understanding common unit suffixes

I can order a list of files / directories by size: ls -lS But if I am using du in human readable format: du --max-depth=1 -h . I get: 128K ./something 3,3M ./more 3,2M ./even-more ... ...
0
votes
2answers
92 views

Can someone explain the meaning of — and ** in a linux/unix command? [duplicate]

du -ch -- **/*.jpg | grep total Especially, what do the -- (double dash) and ** (double asterisk) really mean? Using the Z shell
0
votes
0answers
79 views

Mounted folders with bind take up space in root drive

A few months back, I have set up a separate storage for my data on my linux server (running Ubuntu 17.10). The way I set it up is as follows: /dev/mapper/community--vg-root - primary drive - 60GB - ...
0
votes
1answer
90 views

is there a way to get detailed information about HDD in linux

In 2013 I used a program that analyzes the HDD and gives detailed and deep information about the hard disk. However, that program, CrystalDiskInfo, only works on Windows. Is there a GUI that is ...
0
votes
2answers
79 views

Using 'grep' and the output of `grep` as variable in second command to get user Id of folders

I am using the following commandd to get the % of disk used df -h| grep workfld, than getting the top folders that are using the most disk space in %, the last piece would be to use the output/result ...
-1
votes
1answer
214 views

Disk management issue [duplicate]

After trying to execute the command apt upgrade from the terminal, I received the following error: E: You don't have enough free space in /var/cache/apt/archives/. Not quite sure what to do about it....
1
vote
0answers
43 views

du command shows larger size than nand erase block size in ubifs. How to check the exact size in ubifs?

I use UBIFS for rootfs. I would like to check the size of each direcotries in /. When I checked with du command, it shows larger than mtd size. Would you tell me the way how can I check the correct ...
2
votes
3answers
1k views

disk full: unable to install software packages

I am trying to download a huge python package and suddenly I hit this space crunch issue. When I run df -h command, it shows: [root@darwin ~]# df -h Filesystem Size Used Avail Use% Mounted on /...
-1
votes
2answers
30 views

Space availability on disc

I run Debian 6 linux located on SD card. Trying to extract tar.gz file to /opt directory , but system complains regarding no space available on disc. Command df -k brings: user@ion:/opt$ df -k ...
2
votes
2answers
165 views

Linux Mint startup error due to insufficient disk space

Can you help me please to solve this issue? I am on Linux Mint 18.3. I use it for java script development. I have just Chrome, node and Visual Studio Code. Just couple days ago disk analyzer told me,...
0
votes
1answer
82 views

Programmatically identify block device of filesystem [closed]

The following code was tested on RedHat 7 using df verison 8.2 and lsblk version 2.23.2. This is important as the lsblk utility has signficantly more output options than the RedHat 6 version (2.17.2) ...
2
votes
1answer
112 views

sort: read failed: ./folder/: Is a directory [closed]

When I run: du -sh ./*/ I get the following error: sort: read failed: ./folder/: Is a directory How do I fix this? Is there something wrong with sort on my system. I am running x86_64 Linux 4.16....
5
votes
2answers
568 views

Why do df and df -h show different value? How does df -h perform calculation?

how exactly df -h works? If I run df, I get this: Filesystem 1K-blocks Used Available Use% Mounted on /dev/simfs 41943040 7659828 34283212 19% / If I run df -h, I get this: Filesystem ...
0
votes
3answers
31 views

How to check the available space on the hard disk each day and if it is lower than 1GO remove files

I need to make a planned task : Check the available space on the hard disk each day and remove files if this condition is verified : Available < 1Go. Here is the script that I wrote but doesn't ...
1
vote
2answers
951 views

How does df know how much space is used without needing to go through all the files?

When using du to get the total size of a folder, the command enumerates every file from every (sub)folder and adds it up, in my understanding. yann@p:~$ du /var/log 4 /var/log/ntpstats ... 148 /var/...
0
votes
1answer
547 views

Ubuntu 18.04, what is using my hard-disk space?

I recently installed Ubuntu 18.04 on my machine and installed all the regular stuff that I had put the 17.10 version. However, it seems like something is amiss as my Linux partition is showing ...