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.

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.

Manpage for df.

85 questions
0
votes
1 answer

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 I have time to free up some memory. How can I do…
Raffi
  • 970
  • 11
  • 13
0
votes
2 answers

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 \(*\ \) does not work.
M.S.
  • 485
  • 1
  • 4
  • 7
0
votes
0 answers

Determine the free space on a CD-RW using command line utilites

I'm using the wodim command in bash with the -multi flag to write to a CD-RW without having to blank the disc in between writes. After writing enough sessions to the disc, I have to blank the disc to recover some of the multi-session overhead space.…
Austin Hill
  • 119
  • 1
  • 7
0
votes
1 answer

Getting updated values for Filesys::DiskFree

So i'm working on a script to remove some old backups when the disk space available goes bellow a certain percentage. # get disk info $handle = Filesys::DiskFree->new(); $handle->df(); $available = $handle->avail("$dir"); $used =…
Lex
  • 386
  • 1
  • 4
  • 20
0
votes
3 answers

How can I extract a specific number from df in bash?

My aim is checking if there is still enough space on my disk, every time my script (bash) proceeds a step. Running df; echo $? prints: Dateisystem 1K-Blöcke Benutzt Verfügbar Verw% Eingehängt auf /dev/sdc4 1869858440 1680951776 93900284…
Hert
  • 11
  • 2
  • 3
0
votes
1 answer

df -g cronjob output to text file

I am writing a script to write the output of df -g to a text file once a week. here's my script, I think it should work, but whenever I try and run it as root by typing ./check_space.sh I get the following error: ./check_space.sh: line 13: syntax…
0
votes
1 answer

How to get Disk space(Avail) using 'df -h' when Filesystem is long

I am trying to find available disk space through console I found df -h | awk '$NF == "/" { print $4 }' to get required output. [root@tmpe2etstmsdc01 ~]# df -h Filesystem Size Used Avail Use% Mounted…
Venkatesh
  • 303
  • 1
  • 10
  • 22
0
votes
2 answers

Df available memory printing

Need a help in printing the Available memory in bytes for logical drive below. When I try printing column Available for /dev/mapper/VolGroup00-LogVol00, It is displaying Available 26%, where I need Available 28012413kB Filesystem …
Pari
  • 21
  • 1
  • 4
0
votes
1 answer

Freed Memory not reflecting in DF command

My system memory was almost full as seen by DF command # df -h Filesystem Size Used Avail Use% Mounted on /dev/sda2 40G 38G 268M 100% / udev 2.0G 84K 2.0G 1% /dev When I checked I saw one directory…
RKum
  • 758
  • 2
  • 12
  • 33
0
votes
1 answer

Ubuntu disk space issue

There is some anonymous space consumption on my disk having Ubuntu. When I run the command df -h it shows me that total consumption is 5.4G. But when I run command du -hscx * on / directory it shows total consumption is 3.2G. I am wondering where is…
Abuzer Firdousi
  • 1,552
  • 1
  • 10
  • 25
0
votes
5 answers

Get remaining disk space from df's output

I would like to get the remaining disk space in my home directory: df -h Filesystem Size Used Avail Use% Mounted on rootfs 20G 15G 3.5G 81% / /dev/root 20G 15G 3.5G 81% / devtmpfs 990M 4.0K 990M 1% /dev none…
Oum Alaa
  • 227
  • 3
  • 11
0
votes
1 answer

Linux memory issue

I have a problem on my server. When i try to start my server, it says that "there no left space on device" If i execute the command "df", I see that on directory if full. /dev/mapper/owegdc_vg-owegdc_logs_lv 10321208 9797004 …
La Hu
  • 85
  • 1
  • 11
0
votes
1 answer

How to list the files and folders in a directory with its total size in Linux?

I can't get any command to list all the files and folders with its total size in a directory without showing all the sub-directories. e.g. I have a directory as ls /home/kayan/data/ data-1 data-2 test.txt readme.txt here data-1 and data-2 are two…
Kay
  • 1,957
  • 2
  • 24
  • 46
0
votes
3 answers

returning value from shell to a C program

My question is simple: I'm writing a program in C with the following structure: int qty_used; qty_used = system("df -h | grep 'sda1' | awk 'BEGIN{print "Use%"} {percent+=$5;} END{print percent}'"); if (qty_used
Antonino
  • 3,178
  • 3
  • 24
  • 39
0
votes
1 answer

Expand targeted Splunk search to include all hosts, build report

I am trying to run a search against all hosts but I am having difficulty figuring out the right approach. A simplified version of what I am looking for is: index=os sourcetype=df host=system323 mount=/var | streamstats range(storage_used) as…
xdfil
  • 291
  • 1
  • 14