The world-wide-web is an extension-heavy network, today I’ll share with you what extensions are where to apply them, and how they work.
Without going too deep into the technical side of things I’ll let you know what extensions are so that you know how to look for them when they don’t seem apparent. A common file has a name and an extension like cardgame.py or samsCV.pdf.
What kind of files use extensions?
All computer programs and files use extensions be it a game, video, audio file, or an image all these types of files have extensions in them, and on Windows, O.S extensions are a must-have to run programs with ease.
But, what are files anyway?
ComputerHope defines files as objects on a computer that store, data, information, settings, or commands used with a computer program.
Three Different file types in computers?
Not every file is the same so when you hear about a file it may be the type of file you’re familiar with and sometimes it may not. So before making any decisions on the subject make sure you know which of these three is the file in question “application files, data files, and system files”.
Text Editors and Extensions
Usually when we finish writing a document using Libre Office or Microsoft Word we name these documents ourselves because otherwise the program will name it something random like document 1 for example and nobody likes that.
Besides, having multiple files with random names won’t help us remember what the documents are for and what they are about, ideally, we erase everything before the .docx for Microsoft word or .odt for Libre Office, do you know why?
The .docx on Microsoft word files is the extension generated by the Word Editor, .docx is a document extension. And no you’re not crazy Word file extensions didn’t have the X in them before Word 2007 was introduced it was . DOC but now these documents are based on the XML format, hence the “X”.
XML stands for The Extensible Markup Language, which is made up of both tags and text and this is derived from SGML
Microsoft word is very popular used both for personal and professional means most text editors and documents readers are compatible with Microsoft word files. What I mean here is that I can start writing in Word and finish it up on Libre Office or Google Docs with ease.
Q: What happens if I delete everything while trying to rename a document including the File extension (Windows Operating System)?
Before I answer this here’s another question;
Q: What happens when we double click a pdf file on our computer, which program opens the file if we defined none as a default document viewer, considering that our browsers these days allow us to open and read pdf files?
Let us define what file extensions are so we can easily answer this mystery.
What are computer file extensions?
In short, we can define a computer file extension as a suffix at the end of a computer file program. This extension is usually two to four digits long. The very common everyday extensions most of us deal with are; Docx Pdf. Exe .Xml. jpg. png. mp3 .mp4 and maybe .avi?
Python file extensions are two digits long. (PY) and HTML files are four digits long (HTML).
A: When we save a file without an extension on Windows the system doesn’t open the file because it doesn’t know what program is associated with that type of file. This is an important role of extensions on Windows.
Thanks to a file extension our Operating Systems know what program to use to view or executive commands and without an extension that isn’t possible.
A: Unless a program is set to open .pdf files no program will open the document by default.
We usually get prompted to choose a program from different ones available on our computer that can get the job done.
On Windows, the system knows what to do with a file thanks to the file extension and this is why in our first example I mentioned that unless specified your system won’t know what to do with a file or document.
macOS and Linux use File extensions differently compared to Windows
By default, macOS doesn’t show file extensions but this can be easily set through finder > Preferences> Advance and enable “show all filename extensions”.
Depending on your Linux Distribution in case this doesn’t come by default you can set this up so that file extensions show too.
Unlike Windows, and instead of file Extensions Mac and Linux rely on MIME types and creator codes located on the header of the file to determine how to run files and with what program to get the job done. So, with and without an extension you can still run programs on Linux and macOS.
What happens when we change file extensions?
On Windows, you get a warning, and once this is done the system tries to open the file using the new extension which results in an error.
On Mac, you can’t actually do this using finder. Finder will delete it but the system will put that extension back seconds after and you have MIME type data to thank for that.
Linux is tricky depending on your distribution it actually lets you change the extension as you please. But, once that is done if it isn’t the appropriate extension it fails to load the file.
This error came from a document in .odt format which I renamed and changed its extension to .pdf and got this error message. I renamed it a second time and removed the old, and new extension. Guess what happened? I opened it using Libre-Office with no extension in place. MAGIC!!!!!
Why should you know the common extension file types (security point of view)?
Primarily knowing this will help you understand your files better, determine what goes where and where to make certain changes when necessary. But most importantly this might keep you from falling into traps.
I am assuming that you’re aware of phishing attempts and how to avoid them. I’ve written about the topic a few times before you can view How To Become a Victim Of Cyber Attacks, How to Fight Cyber-Crime, A Letter By Mrs. Hannah, Keep Your Data Away From Suspicious Emails and We’re all Vulnerable Because We’re Human. That’s more than enough self-promo for the day, please let us continue →…
Knowing what a windows executable file extension looks like you won’t dare to click on any file from non trusted sources because you know better.
Pdf files can contain documents but nobody saves all their photos as pdf files so don’t click on those. You can include certain information on executable files but no CV should come as a .exe file. I’m sure you get the idea.
The different way that Mac and Linux read and execute files doesn’t change the fact that these files need to be compatible this is why programs are made available for these different platforms, with or without an extension. if it wasn’t made for Mac it won’t run on Mac.
For this last example, I will use a very popular program available for all major platforms, VLC, a media player, and an open-source program.
We’re doing nothing special here, just making things clear. Not having an extension doesn’t create superpowers for the Operating System. If the program isn’t made for the appropriate OS it just won’t run.
Thanks to the power of our browsers and cookies and the servers behind these sites, when you visit a website like Videolan because it has already recognised your O.S it provides the appropriate version for you, but you can always change it using the drop-down option that I selected on the above screenshot.
Use this information on extensions and document types to choose the correct version of any program or document for your device.
Drop your questions in the comments let me know if this was useful and as always STAY-SAFE.