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 data and use it somewhere else in my shell script. I initially thought about using cut but then my script wont be portable to other disks as free disk space will vary and cut will not produce accurate results. How can I get output of just the free