I have changed the file extension in order to hide them (such as .avi or .mp4 to .stg) and forgotten the original extension, how to check the original extension and reconvert them?
44 Answers
On Linux and OSX there is a command
file yourfilenamethat guesses the file type.
If you're comfortable programming in almost any language, you could write a script and just examine the first few bytes of the files headers and rename as appropriate. Most all video/picture/audio headers are available online.
2Trid is a useful command line application that identifies a ton of filetypes. Assuming it actually is a file, it should help identify it.
It uses a slightly different strategy from file, and might detect possible filetypes rather than what the magic number of the file says
If you open the file in a HEX editor like HxD you will be able to see the file header on the right hand side, This will give you information about your file type.