xxxxxxxxxx
import subprocess
# Run the 'df' command to get disk usage information
result = subprocess.run(['df', '-h'], stdout=subprocess.PIPE)
# Decode the output and split it into lines
output = result.stdout.decode('utf-8')
lines = output.split('\n')
# Print the first line (header) and the last line (disk usage information)
print(lines[0])
print(lines[-2])