determine the files extension
Posted on 2014-11-12
In linux, we can use the command file "example.txt" to determine the true extension of the file. Even if I rename the original example.zip file to example.txt, the file command still can recognize the true extension by using magic header.
So do we have any way to determine the list of files inside a folder by using bash, powershell or python. I prefer these languages because it's easy for me to read and understand.
Can anyone help me with this?
Thank you so much.