Advertisement
Guest User

inode

a guest
May 24th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Python 0.40 KB | None | 0 0
  1. import os
  2. # Sorry this is a very lame code
  3. lst = []
  4. data = os.popen('df -i').readlines()
  5. data = data[1].split(' ')
  6. for i in data:
  7.     if i != '':
  8.         lst.append(i)
  9. exhaust_count = int(lst[3])
  10. print "Total free inodes:",exhaust_count
  11. count = 0
  12.  
  13. for i in range(exhaust_count+100):
  14.     os.system('touch '+str(i)+'.txt')
  15.     count+=1
  16.     print "So far:",count, "Remaining:",exhaust_count-count
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement