8 lines
No EOL
250 B
Python
8 lines
No EOL
250 B
Python
import string
|
|
import subprocess
|
|
|
|
|
|
def find_storage_usage(path: string) -> string:
|
|
output = subprocess.check_output(['df', '-h', '--output=pcent', path])
|
|
percentage: string = output.strip().__str__().split()[1]
|
|
return percentage.strip("'") |