Posted By

eliluminado on 03/04/11


Tagged


Versions (?)

Hiding files in GNU/Linux


 / Published in: Python
 

URL: http://www.codigopython.com.ar/?p=152

Simple script to hide files on GNU / Linux Sencillo script para ocultar archivos en GNU/Linux

  1. def hide(file):
  2. import os
  3. if not os.path.exists(file):
  4. return
  5. archive = os.path.basename(file)
  6. if archive[0] == '.':
  7. return 1
  8. else:
  9. directorio = os.path.dirname(file)
  10. newfile = directorio+'/''.'+archive
  11. os.rename(file, newfile)

Report this snippet  

You need to login to post a comment.