Most viewed recipes tagged "disk" Code RecipesDisk usage (Python) 2012-10-06T15:33:40-07:00Giampaolo RodolĂ <p style="color: grey"> Python recipe 577972 by <a href="/recipes/users/4178764/">Giampaolo RodolĂ </a> (<a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/python3/">python3</a>, <a href="/recipes/tags/space/">space</a>, <a href="/recipes/tags/statistics/">statistics</a>, <a href="/recipes/tags/usage/">usage</a>). Revision 6. </p> <p>Provides disk usage statistics (total, used and free disk space) about a given path.</p> <p>This recipe was initially developed for psutil:</p> <ul> <li><a href="" rel="nofollow"></a></li> </ul> <p>...and then included into shutil module starting from Python 3.3:</p> <ul> <li><a href="" rel="nofollow"></a></li> <li><a href="" rel="nofollow"></a></li> <li><a href="" rel="nofollow"></a></li> </ul> <p>The recipe you see here is a modified version of the latter one in that the Windows implementation uses ctypes instead of a C extension module. As such it can be used with python &gt;= 2.5.</p> Get disk partition information with psutil (cross-platform) (Python) 2016-12-23T18:05:41-08:00Vasudev Ram <p style="color: grey"> Python recipe 580737 by <a href="/recipes/users/4173351/">Vasudev Ram</a> (<a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/file_system/">file_system</a>, <a href="/recipes/tags/psutil/">psutil</a>, <a href="/recipes/tags/python/">python</a>, <a href="/recipes/tags/sysadmin/">sysadmin</a>, <a href="/recipes/tags/system/">system</a>). </p> <p>This is a recipe that shows how to easily get disk partition information, in a cross-platform manner (for the supported OSes), from your computer's operating system, using the psutil library for Python.</p> Find Duplicate Files (Python) 2014-10-12T21:14:05-07:00FB36 <p style="color: grey"> Python recipe 578950 by <a href="/recipes/users/4172570/">FB36</a> (<a href="/recipes/tags/dictionary/">dictionary</a>, <a href="/recipes/tags/directories/">directories</a>, <a href="/recipes/tags/directory/">directory</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/file/">file</a>, <a href="/recipes/tags/files/">files</a>, <a href="/recipes/tags/utility/">utility</a>). </p> <p>Finds duplicate files which have same size and same content in the same directory or two different directories.</p> NBD server in python (Python) 2011-02-08T20:59:23-08:00Dima Tisnek <p style="color: grey"> Python recipe 577569 by <a href="/recipes/users/4068698/">Dima Tisnek</a> (<a href="/recipes/tags/analyze/">analyze</a>, <a href="/recipes/tags/block/">block</a>, <a href="/recipes/tags/device/">device</a>, <a href="/recipes/tags/disk/">disk</a>, <a href="/recipes/tags/io/">io</a>, <a href="/recipes/tags/linux/">linux</a>, <a href="/recipes/tags/nbd/">nbd</a>, <a href="/recipes/tags/network/">network</a>, <a href="/recipes/tags/python/">python</a>). </p> <p>Linux Network Block Device server in Python</p> <p>This is a simplified version based on Kragen Sitaker's <a href="" rel="nofollow"></a></p> <p>Close is never actually called, at least not on the same connection -- linux C nbd-client -d seems to stall, perhaps it tries to open another socket?</p> <p>This code doesn't check for error conditions, failed reads/writes, past end of disk, etc.</p> <p>It prints io requests, you can analyze filesystem and user program io patterns.</p> Checking letters for drives that already using (Batch) 2012-11-19T08:32:33-08:00greg zakharov <p style="color: grey"> Batch recipe 578334 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/disk/">disk</a>). </p> <p>For keeping order drive naming with active <strong>diskpart</strong> using.</p> Counting freespace of all drives with ready status (Batch) 2012-11-14T19:06:44-08:00greg zakharov <p style="color: grey"> Batch recipe 578328 by <a href="/recipes/users/4184115/">greg zakharov</a> (<a href="/recipes/tags/disk/">disk</a>). </p> <p>Checking freespace of drives which active at execution batch moment.</p>