Knowing file extensions really helps to understand what a program is doing or using. What are some common one's and how do I extract them?
Knowing file extensions really helps to understand what a program is doing or using. What are some common one's and how do I extract them?
File extension are up to the creator of the file. In Linux you can name something music.mp3
but if it is a text file it will open with gedit
if that is your texteditor because it will look at the 1st bit/byte(?) where it says what kind of file it is.
When it comes to bash script it is considered best practise to not include .sh
at the end. By omitting it you basically create a command
so those do not tend to even have an extension. And those commands could be made in bash but also in perl or python.
So looking at the actual name of the file might be misleading!
Linux has a command file
to find out what a file is. Syntax file *
Some random samples:
xxxx.sql: UTF-8 Unicode text, with very long lines
xxxx.sql.gz: gzip compressed data, was "xxxx.sql", from Unix, last modified:
Wed May 18 10:21:34 2011
yyyyy: ASCII text
iffffff: directory
ghgggg.tar: POSIX tar archive (GNU)
fhhfhf.pl: perl script text executable
For a list of extensions Fuddledumpy's post can be used and files ending on .pl will more than likely be perl scripts but to make sure use file
.