set
09
2010

unnamed files

I’m a heavy user of command line interface and often named files without extension. This behavior forces me to use file utility every time I have doubts.

$ file stick-note1
stick-note1: ASCII text

When organizing my home/ I came across with many files like that, so I decided make this script to walk throughout files and check if it’s text file without extension and put .txt after.

download script

$ python names.py
This only change the file on current directory and it’s a “works for me” approach. Adapt to your needs.

tags: ,
posted in gnu by Tiago Maluta

Follow comments via the RSS Feed | Deixe um comentário | Trackback URL

Leave Your Comment