So, a friend of mine sent me a file with extension .run.gz saying that its a pretty good game. I decided to give it a try and started to extract it, but wait! I got the error saying that it is not a gzip archive. Something was definitely wrong. I was totally confused, thinking "What the hell!!"
. The mystery was finally revealed when I ran file command. It stated that the file is a "POSIX shell script text executable". In simple words, I just had to execute the file.
File command doesn't work by looking at the extension, its just for humans. It tries a variety of tests to check the file-type. You can read all about it in the man page. The usage is pretty simple.
[shredde12]$ file fake_file.run.gz
fake_file.run.gz: POSIX shell script text executable
If you have noticed, nautilus only checks for actual file-type if the extension is not mentioned. Otherwise, it just goes with the extension name and displays the appropriate icon.
For those interested, it was not a game just a filthy time-waster. But since I got a tip out of it for you guys, it wasn't all worthless
.
Post new comment