Iterating over os.walk in linux
<p>We have multiple linux server and i would like to get all the details of files and directories in a particular linux server. I know this can be done with os.walk function but it is storing only single file information. Please find the below code</p>

<pre><code>import os
for d in os.walk('/'):
    F = open('/home/david/Desktop/datafile.txt', 'w')
    F.write(str(d) + '\n')
    F.close()
</code></pre>

<p>Thanks in advance</p>
