Hiding files in GNU/Linux


/ Published in: Python
Save to your folder(s)

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


Copy this code and paste it in your HTML
  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)

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

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.