Showing hidden files in GNU/Linux - Mostrando archivos ocultos en GNU/Linux


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

Showing hidden files in GNU/Linux - Mostrando archivos ocultos en GNU/Linux


Copy this code and paste it in your HTML
  1. def show(file):
  2. import os
  3. if not os.path.exists(file):
  4. return
  5. archive = os.path.basename(file)
  6. directorio = os.path.dirname(file)
  7. if archive[0] != '.':
  8. return
  9. else:
  10. while archive[0] is '.':
  11. archive = archive[1:]
  12. newfile = directorio+'/'+archive
  13. os.rename(file, newfile)

URL: http://wiki.codigopython.com.ar/pyhide:mostrando-archivos-ocultos-en-gnu-linux

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.