get free size 1

get free size

df -h # linux

Here is what the above code is Doing:
1. We’re using the subprocess module to run the df command.
2. We’re using the check_output() function to run the command and store the output in a variable.
3. We’re using the decode() function to convert the output from bytes to a string.
4. We’re using the split() function to split the output into a list.
5. We’re using the for loop to iterate over the list and print each line.

Similar Posts