Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python check disk space

$ cat free_space.py 
#!/usr/bin/env python3

import shutil

total, used, free = shutil.disk_usage(__file__)
print(total, used, free)

$ ./free_space.py 
1007870246912 460794834944 495854989312
Comment

PREVIOUS NEXT
Code Example
Python :: how to sort values in numpy by one column 
Python :: intersection in list 
Python :: how to remove python3 on mac 
Python :: show all rows with nan for a column value pandas 
Python :: ball bounce in pygame 
Python :: how to replace a row value in pyspark dataframe 
Python :: python tqdm while loop 
Python :: how to do channel first in pytorch 
Python :: migrate using other database django 
Python :: python split tuples into lists 
Python :: A Python list exists in another list 
Python :: how to get the code of a website in python 
Python :: how to run commands in repl.ot 
Python :: how to set index pandas 
Python :: pyqt5 pylatex 
Python :: how to check if two columns match in pandas 
Python :: python read arguments 
Python :: how to take second largest value in pandas 
Python :: python pandas cumulative sum of column 
Python :: pandas filter rows by value in list 
Python :: python check list contains another list 
Python :: get all count rows pandas 
Python :: how to increase size of graph in jupyter 
Python :: playsound module in python 
Python :: openpyxl write in cell 
Python :: run 2 loops simultaneously python 
Python :: scatter plot plotly 
Python :: converting pandas._libs.tslibs.timedeltas.Timedelta to days 
Python :: powershell get list of groups and members 
Python :: youtube-dl python download to specific folder 
ADD CONTENT
Topic
Content
Source link
Name
6+6 =