Answer the question
In order to leave comments, you need to log in
Is it possible to determine the remaining free space on the disk where the file is located!?
Can you guys determine how many percent of free disk space is left where the file lies, by specifying the path to the file displays the remaining free disk space?
Answer the question
In order to leave comments, you need to log in
df with the path to the file as a parameter will display a line on the device on which the folder is located. (tested on debian 8 )
df ./ | awk 'END { print "Free " 100-int($5) "%"}'
Achieve your goal by combining the results:
$ mount | grep sd
...
$ df | grep sd
...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question