Control of File Types in Ubuntu | Linux Today

Control of File Types in Ubuntu

Written By
Web Webster
Web Webster
Apr 15, 2010

[ Thanks to Ramsai
for this link. ]

“Ubuntu uses advanced systems for detecting file types
and associating them with applications, but it’s not that hard to
dive in and take some control over the formats. In this article by
Delan Azabani, you’ll learn how Ubuntu identifies file types, how
to use Assogiate to control these processes, using Ubuntu Tweak to
associate types with applications and use Bless to inspect binary
files. What is a file type?

“Let’s not go as far deep as “What is a file?”, but before we
start, let’s take a look at file types. File types are determined
by the contents of the files themselves, and are used to allow the
opening program to be chosen wisely. In Microsoft Windows, file
extension globbing is the sole method of identifying file types.
Users must provide a common phrase at the end of files, and the
files would be searched by their name, in turn providing the
correct icon and program.

“Things are a little different in Ubuntu. Of course, globbing
(the most basic method) is present for file types, but Ubuntu has a
few other tricks up its sleeve. One of these is magic numbers. The
magic number of a binary file is the first few bytes, which
identify the file type. The definition of a “magic” number has
somewhat loosened in recent years; it can now mean any piece of
data, generally near the beginning of a file, that can be used to
uniquely identify the type.”

Complete
Story

Web Webster

Web Webster

Web Webster has more than 20 years of writing and editorial experience in the tech sector. He’s written and edited news, demand generation, user-focused, and thought leadership content for business software solutions, consumer tech, and Linux Today, he edits and writes for a portfolio of tech industry news and analysis websites including webopedia.com, and DatabaseJournal.com.

Linux Today Logo

LinuxToday is a trusted, contributor-driven news resource supporting all types of Linux users. Our thriving international community engages with us through social media and frequent content contributions aimed at solving problems ranging from personal computing to enterprise-level IT operations. LinuxToday serves as a home for a community that struggles to find comparable information elsewhere on the web.

Property of TechnologyAdvice. © 2026 TechnologyAdvice. All Rights Reserved

Advertiser Disclosure: Some of the products that appear on this site are from companies from which TechnologyAdvice receives compensation. This compensation may impact how and where products appear on this site including, for example, the order in which they appear. TechnologyAdvice does not include all companies or all types of products available in the marketplace.