Questions tagged [linux-disk-free]

NOT FOR USE WITH DATAFRAMES. Use [dataframe] for such questions. df (abbreviation for disk free) is a Unix and Linux command. The df command reports the amount of available disk space being used by file systems.

Filter by
Sorted by
Tagged with
0 votes
1 answer
169 views

How to find the sum of df total capacity in bash cell [duplicate]

I wrote a script to calculate the sum of the df total capacity in Linux' Bash shell. Is there a way to calculate it without creating a file? #!/bin/bash if [ -f /tmp/df_test.txt ] then rm tmp/...
김태웅's user avatar
0 votes
1 answer
437 views

df -h giving fake data?

when i'm writing df -h in my instance i'm getting this data: Filesystem Size Used Avail Use% Mounted on devtmpfs 7.7G 0 7.7G 0% /dev tmpfs 7.7G 0 7.7G 0% /dev/shm ...
Bernana's user avatar
  • 245
5 votes
2 answers
190 views

Raku-native disk space usage

Purpose: Save a program that writes data to disk from vain attempts of writing to a full filesystem; Save bandwidth (don't download if nowhere to store); Save user's and programmer's time and nerves (...
uxer's user avatar
  • 521
1 vote
0 answers
408 views

Command to get Inodes usage without having to create temporary files first

I used to use this command and it needs to create temporary file first, so it doesn’t work when inodes is full and will throw an error: cannot create temporary file in '/tmp': Disk quota exceeded find ...
noobtech112's user avatar
0 votes
1 answer
664 views

Understanding df output inside GKE container

I’m trying out ephemeral storage for the first time. I have a node with a single 375G local SSD disk (GKE), and a 100G standard boot disk. For the ephemeral storage, I use emptyDir, mount the volume ...
HoosierDaddy's user avatar
0 votes
1 answer
215 views

Cut command in AIX

We would like to automate the disk cleanup process by using a shell script on an AIX 7. We need to write a shell script to clean disk according to disk percentage Sample output of df -Pg user:host:/:&...
caggri's user avatar
  • 5
1 vote
0 answers
253 views

df -ah wrong output - How to correct?

Hello all, I am unsure why my output for /dev/mapper/vg_splat-lv_log is at 84%. I used this formula to calculate (Used/Size)x100. Therefore (270/340)x100 = 79%. Has anyone else experienced this? Can ...
Young Autobot's user avatar
0 votes
0 answers
99 views

find name of nfs server with python [duplicate]

I'm hoping to figure out a way to do find the name of the nfs server a particular file/directory is coming from within python, not using an external command. Here's what I have so far which seems too ...
keithpjolley's user avatar
  • 2,097
1 vote
1 answer
355 views

Docker does not see all disks - No space left on device [duplicate]

If i run df -h inside the Dockerfile of an image I want to build, it sees: Filesystem Size Used Avail Use% Mounted on overlay 118G 112G 0 100% / tmpfs 64M 0 64M ...
ALU's user avatar
  • 354
0 votes
1 answer
803 views

Why is my ceph cluster value(964G) of raw used in global secion far higher than that(244G) of used in pools sectio

Why is my ceph cluster value(964G) of raw used in global section far higher than that(244G) of used in pools section [en@ceph01 ~]$ sudo ceph df GLOBAL: SIZE AVAIL RAW USED %RAW USED ...
aditya guan's user avatar
0 votes
1 answer
155 views

how to get hdd's free space

I want to get free hdd's size in a remote system with ssh. I found this ways: 1-do it via command line: hdd's totalsize - sum of partitions size on that hdd + sum of free spaces on all partitions on ...
fa7eme's user avatar
  • 73
1 vote
1 answer
427 views

If there is any script or command that can check which of the NFS mounts are having problems and which aren't?

I have recently been having problems running df -h, where it just hangs? I tried running dmesg and getting the following snipped output: [163075.079660] nfs: server 10.52.88.225 not responding, timed ...
Manish Narang's user avatar
0 votes
1 answer
922 views

df command works in terminal, but not in bash script

I found the code below on a website. I know what it does and understand it, but I can't get it to work correctly. When I run it in Redhat 6.10, I get an error stating, "line 6: [: /: integer ...
Deuce1912's user avatar
0 votes
1 answer
878 views

df is not included in build/tmp/hosttools

I am using bitbake to build a recipe. One recipe shows it needs df. I checked build/tmp/hosttools df is not there, but I can manually copy df from /bin/df How to config yocto to let it include ...
GreenTea's user avatar
  • 779
1 vote
0 answers
590 views

df showing wrong disk usage despite the directory is empty

When I check the size of used space on my disk on a linux centos 7.4 for directory /logs. I get as bellow (33M used) with df but with du I get 0: $ df -h /logs Filesystem Size ...
kawther's user avatar
  • 184
0 votes
0 answers
46 views

Discrepancy in disk usage

I'm troubleshooting an issue regarding disk size usage in a centOS system (one of the partitions was growing too fast), and I notice one of my directories has 3.1GB: $ du -hs /var/log/mongodb/ 3.1G ...
samthegolden's user avatar
  • 1,366
1 vote
3 answers
826 views

List Volumes with DF, Grep, Awk | Bash Shell

Trying to print all entries which start with /Volumes/, this to list mounted volumes on mac. See Updates. IFS=$'\n' read -r -d '' -a volumes < <( df | egrep -o '/Volumes/.*' ) echo "${...
Adrian's user avatar
  • 33
0 votes
1 answer
587 views

Incorrect used disk space percentage when calculated using Ansible

Can you please tell me why is the percentage of a used drive (disk space) shows 28.5% with ansible while the df -k shows only 19% used on remote Linux host? Here is my playbook code: - name: ...
Ashar's user avatar
  • 2,922
0 votes
1 answer
273 views

Python Script to compare du and df console outputs

As part of a larger project, I'm currently writing a python script that runs Linux commands in a vApp. I'm currently facing an issue where after working with a mounted iso, it may or may not unmount ...
Stephen Dunne's user avatar
0 votes
1 answer
98 views

Filesystems, and quota for the home directory and /usr/local on the Google Cloud VM

I created a Debian VM on google cloud. Below is information from "df -h". What are those filesystems, such as tmpfs or /dev/sda1, mean? Any beginner-friendly reference for them? In particular, how ...
zell's user avatar
  • 9,849
3 votes
0 answers
2k views

calculate disk usage percentage to match df Use% output

I am trying to calculate and display in percentage the current disk usage with this: use nix::sys::statvfs::statvfs; macro_rules! cast { ($x:expr) => { u64::from($x) }; } fn main(...
nbari's user avatar
  • 25.7k
-2 votes
1 answer
512 views

File System Disk Space Usage

When I use the unix df command to return the disk usage, I get the following reported /dev/sda1 30929148 30530112 399036 99% / How get what is using the disk space. Is ...
Pete Long's user avatar
  • 107
0 votes
3 answers
964 views

Add timestamp for each line on the df output command?

I would like to add the date for each line of the df output. I tried: df -m | awk '{print `date +%Y-%m`";"$1";"$2";"$3 }' ... but it doesn't work. How can I add the date?
Ezzmazz's user avatar
  • 113
3 votes
2 answers
18k views

Disk Usage in kubernetes pod

I am trying to debug the storage usage in my kubernetes pod. I have seen the pod is evicted because of Disk Pressure. When i login to running pod, the see the following Filesystem Size Used ...
SunilS's user avatar
  • 2,040
1 vote
1 answer
595 views

Why is df command showing incorrect size?

I am using a 64 MB QSPI formatted in some UBI partitions. df is an applet of busybox 1.27.2 Actually, ~ # df -h Filesystem Size Used Available Use% Mounted on /dev/ubi0_0 ...
alain's user avatar
  • 165
2 votes
1 answer
492 views

Available blocks with `df`

I'm using statvfs to have an extremely simple in-house df command. Other than not knowing how to get the file system device path, my main issue is that the available 1K blocks differ in my ...
bicup's user avatar
  • 305
0 votes
1 answer
3k views

How do I add timeout while using fabric for below code?

Code is as below. I will explain here. I use fabric to check the mount point status for 2 server. The command is df -h /mnt The problem of this command is that it may hang there forever, so the ...
Kramer Li's user avatar
  • 2,284
4 votes
1 answer
7k views

Spark: Split is not a member of org.apache.spark.sql.Row

Below is my code from Spark 1.6. I am trying to convert it to Spark 2.3 but I am getting error for using split. Spark 1.6 code: val file = spark.textFile(args(0)) val mapping = file.map(_.split('/t')...
Vin's user avatar
  • 177
2 votes
2 answers
671 views

Find size of checked-out code in current directory

I want to find the size of the current checked-out files in a folder/project, but ignore the git directory. Something like: du . --ignore '.git' Is there a way to find the size of all the files ...
user avatar
1 vote
3 answers
440 views

Capture specific value from df -h --total using PHP

How can i populate a variable holding the total value from below content extracted after running df -h --total on centos. Note: the result is not from command line but from a php file. How do i only ...
Omari Victor Omosa's user avatar
2 votes
1 answer
483 views

Cronjob continuously reduces free disk space

I have a .NET Core 3.0 Console App, running on a Ubuntu 18.04 server. There is a simple launcher script in my home folder, called my-app.sh: cd /home/service/my-app ./My-App I wanted to start the ...
Andi's user avatar
  • 3,244
-3 votes
1 answer
90 views

With df -h how to create custom alert-conditions [closed]

With df -h, awk, tail, tr, how to create a custom "alert" column that should display one of the following indications for /mnt/hgfs : Warning: If the occupancy rate is between 75% and 80% Critical: ...
John Rudolph's user avatar
0 votes
1 answer
1k views

Why do I always get 1 for df when running adonis function (permanova)?

I run adonis on community data and environmental matrix (that contains a factor of two levels and 6 continuous variables) using Bray-Curtis and I always take 1 df but this is not the case. Probably ...
user1711727's user avatar
8 votes
2 answers
9k views

Issue in installing oracle 18cxe on ubuntu 18.04

I am trying to configure Oracle XE but am facing the below issue: root@venky-Lenovo-G510:~# /etc/init.d/oracle-xe-18c configure /bin/df: unrecognized option '--direct' Try '/bin/df --...
venky513's user avatar
  • 321
0 votes
1 answer
140 views

PERL script to compare partition usage from today's to yesterday's in different hosts using a CSV file

I am new in perl struggling to build my 1st script but, the partition module doesn't work. More details are commented in the code. Maybe the code should be rewritten using hash and reference but I ...
jtech's user avatar
  • 9
0 votes
0 answers
26 views

How to get the value for a pattern for a range including the pattern

I'm looking to get all the Filesystem including data to data[1-4], so while using below i only get the value for range specified like data1 to data4, However i'm looking to have data as well. [root@...
krock1516's user avatar
  • 441
2 votes
1 answer
1k views

ceph df showing available space which doesn't match ceph partition size

I just noticed a backfillfull osd warning in our ceph cluster and there is something really strange in how ceph osd df is showing available space. If I try to look at ceph' storage partition with df -...
Nicko Glayre's user avatar
  • 1,315
0 votes
1 answer
219 views

How to correctly format df pipe through genmon?

I am having trouble with command output formatting. In terminal this works nicely: df | grep sda1 | head -c33 | tail -c7 | tr -d " " In genmon, I get only numbers such as "1145944": SDAFREE=$(df | ...
chickensk's user avatar
2 votes
1 answer
221 views

df shows double the actual size on FreeBSD when run via cron

I have written a bash script that collects data from a server and sends it to a log file that is being monitored by a splunkforwarder. The server runs FreeBSD and has a ZPool that is shared via Samba. ...
Felix's user avatar
  • 23
1 vote
1 answer
415 views

OpenEdge 10.2A - prodict/load_df.p - Load New Objects Online, Ignoring Errors, Gives Warning

I'm trying to load new objects using load_df.p and I do NOT want to see any messages. But even if I give "ignore any errors and commit the loading of the .df" parameter as yes it gives a warning. RUN ...
aza's user avatar
  • 115
0 votes
1 answer
1k views

producing df command a grand total specific filesystem

Just need to do some basic thing which I could manage on my own but turned out I have doubt on the result I get... I need to produce a grand total using df command on specific filesystem on two ...
emilee's user avatar
  • 25
-1 votes
1 answer
2k views

Finding disk space details Linux server

I have a strange issue. When I use the below command [user@lautpyy003d ~]$ df -h /app/dev-data Filesystem Size Used Avail Use% Mounted on nfspci1q-2421-03.xxx.xx.xxx.xxxx:/app_nfs/...
user2967948's user avatar
-1 votes
1 answer
438 views

reserve,used,available,total disk space in linux

Is there any single linux command or single system call through which I can get all 4 information(Total,used,free,reserved) ? I have checked following: df: does not give reserve disk space stat(): ...
Ek1234's user avatar
  • 417
0 votes
2 answers
302 views

display used disk space including reserve disk space in bash

I need show used disk space as (used+reserved),I have created below script and planning to add used and reserved,Is there a better way to do this? I need to display "disk total used available" in ...
Ek1234's user avatar
  • 417
1 vote
1 answer
2k views

Partition's size in df -h is totally different than the size in /proc/partitions [closed]

I'm using buildroot to build a custom linux system for my raspi A+. Using genimage, I've created two partitions on a 1 GB sdcard. The first partion is the boot partition. It's vfat and it is 32 MB. ...
slaadvak's user avatar
  • 4,601
-4 votes
1 answer
118 views

AWS instance not showing the correct free space

I use AWS and I got an EC2 instance. When I run the command du -h --max-depth=1 I get: and When I run the command df -h I get: It look I use only 1GB but it show that I am using 7.1GB. So I ...
Blackstar's user avatar
2 votes
3 answers
6k views

Use 'df -h' to check % remaining disk space of a specific folder

I am using 'df -h' command to get disk space details in my directory and it gives me response as below : Now I want to be able to do this check automatically through some batch or script - so I am ...
dynamicJos's user avatar
0 votes
4 answers
1k views

How to strip output of grep?

I'm writing a script which utilises the salt-cli (SaltStack) as well as generic command line arguments to produce a simple HTML-based table outlining all of our servers' Hardware specs and software ...
jto's user avatar
  • 175
0 votes
1 answer
217 views

Pause a process before disk is full

Certain processes (like git gc --aggressive) take a long time to run, take up lots of disk space, and die if I run out of disk space. I'd like to pause them if the disk will run out of space soon, so ...
Raffi's user avatar
  • 970
0 votes
2 answers
1k views

Manipulate df output with sed

I have a question about sed. Output: Filesystem avail rpool/ROOT/s10_u11_201704 244719726 Wanted information: s10_u11_201704 I tried: df -b / | sed '1d;s/.*\/\(*\ \)\ .*/\1/g' The \...
M.S.'s user avatar
  • 485