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
63
votes
2 answers

How to get df linux command output always in GB

How to get df linux command output always in GB always? ie. I want below 34MB to be displayed in GBs Filesystem Size Used Avail Use% Mounted on /ttt/pda1 21G 20G 34M 100% / How can this be achieved ? Thanks in advance.
Aryan
  • 1,767
  • 2
  • 22
  • 39
35
votes
5 answers

Get free disk space with df to just display free space in kb?

I'm trying to output the amount of free disk space on the filesystem /example. If I run the command df -k /example I can get good information about available disk space in kb but only by being human and actually looking at it. I need to take this…
Whoppa
  • 949
  • 3
  • 13
  • 23
19
votes
4 answers

How to find out the free disk space for a given path on a linux shell?

1) I am in some directory 2) I want to find out how much free space is left there Is there a simple command that does this? I don't want to look in fstab or whatever, having to map the devices & mount points in my mind in order to determine how much…
11
votes
2 answers

How to select a particular column in linux df command

I am trying to collect information on the amount of space left on different servers. So when I execute df -k i get output as: Filesystem 1024-blocks Used Avail Capacity Mounted on /dev/ad1s1f 125925198 2568970 113282214 2% …
Ram Krishna
  • 191
  • 1
  • 1
  • 13
8
votes
2 answers

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 --help' for more information. Specify a password to be…
venky513
  • 321
  • 2
  • 15
8
votes
7 answers

How can I *only* get the number of bytes available on a disk in bash?

df does a great job for an overview. But what if I want to set a variable in a shell script to the number of bytes available on a disk? Example: $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda 1111111111 …
Ryan
  • 14,682
  • 32
  • 106
  • 179
5
votes
2 answers

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 (notify them of the problem instead of having…
uxer
  • 521
  • 3
  • 10
4
votes
1 answer

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')).map(a =>…
Vin
  • 177
  • 3
  • 11
4
votes
2 answers

df and du giving different results

When I use df -h it gives following result for /appl directory /appl 39G 32G 6.7G 83% /appl But when I enter that directory cd /appl and run du -sh it is giving me the following result : 4.9G . If the /appl…
user1
  • 336
  • 1
  • 6
  • 17
3
votes
0 answers

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() { let stat =…
nbari
  • 25,603
  • 10
  • 76
  • 131
3
votes
2 answers

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 Avail Use% Mounted on overlay 30G 21G …
SunilS
  • 2,030
  • 5
  • 34
  • 62
3
votes
1 answer

mount system call in linux cannot display the mountpoint of file system by df command

I am trying to use mount() instead of mount command in my program, I use the following mount() successfully, the result returned success instead of Invalid Argument. int rc = mount("172.16.74.20:/data/redun/snmp","/mnt/data/redun/snmp", …
Leo Xu
  • 101
  • 6
2
votes
1 answer

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 implementation and the df output. Here's mine: Filesystem …
bicup
  • 305
  • 1
  • 11
2
votes
2 answers

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 ignoring what's in the .git folder? When I do this: du…
user11810894
2
votes
1 answer

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 file after reboot, so I created a cronjob for the…
Andi
  • 3,234
  • 4
  • 32
  • 37
1
2 3 4 5 6