1

I am looking to make a backup to a remote drive, but I want to do a check prior to doing so.

Is it possible to snatch only the "Available" space from the df output, rather than all of the details, to compare to the size of the dump?

Michael Lowman
  • 3,584
  • 19
  • 36
koo
  • 23
  • 3

1 Answers1

3

Sirex,

I had to change it to $print 4, but that is exactly what was needed. Thank you so much.

warren
  • 17,829
  • 23
  • 82
  • 134
koo
  • 31
  • 1
  • 3
    You can void the use of grep by running `df `. Note also that this will fail for long device names, because `df` will then use two lines of output for the filesystem, which will throw off your column count. You can avoid this -- under Linux -- by running `df -P `, which ensures a single line of output per filesystem. – larsks Jul 08 '11 at 13:07