security offer from FOSS Post

Whenever you create a new file, whether using your office application, digital camera or video editor, a set of metadata fields are – most of the time – created as well on your new file. These metadata fields are hidden and you can’t see them in the file itself, but they might be revealing a lot of information about you and how you created that file.

Such metadata may include:

  • The creation or modification date of that file.
  • The name of the software which was used to create it.
  • The username of the operating system when the file was created.
  • A unique identifier that points to the software license used by the file creator.
  • In the case of digital cameras, photos may include lens information, camera type and other info.
  • Much more depending on the file format.

These metadata fields are quite revealing, which could impact your privacy and help unwanted people identify your real identity (if you were using an anonymous one) and reveal extra information about you, which is perhaps not what you want.

This article will show you how you can see file metadata on Linux, and how to strip and remove them as well if you wish to.

View and Remove File Metadata Using Linux Command Line

The best way to do that on Linux is using the “exiftool” command line program. It is an open source program licensed under the GPL 3 license, and exists in most Linux distributions repositories by default.

To install it on Ubuntu, run:

sudo apt install libimage-exiftool-perl

On Fedora, run:

sudo dnf install perl-Image-ExifTool

For other Linux distributions, just search for exiftool in your distribution’s repositories to find the package.

Once installed, you can now run the tool on any file that exists on your system using the following format to view its metadata fields:

exiftool -s <path_to_file>

For example, see this picture and how it displays metadata information:

Pasted image 0

To remove a specific metadata field from the file, simply run the following command (Yes, there is a space after the = symbol):

exiftool -<TAG_Name>= <path_to_file>

Basically, you are telling the tool that you want to unset the desired field value, which is why we are just not assigning any value to the metadata field after the = sign. We just leave it empty.

An example command on that would be:

exiftool -CreateDate= '/home/mhsabbagh/Downloads/seagull.mp4'

If you run the exiftool -s command again on the file, you will see that the metadata field we stripped is now empty of value:

Pasted image 0

You can now run the same command again multiple times for any metadata fields that you want to strip from your files.

In this way, no one will be able to use that information to hijack your privacy or identify you, and you can share your files safely over the network with anyone you want without having to worry about your identity.

That’s it!

security offer from FOSS Post
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments

Newsletter

Enter your email address to subscribe to our newsletter. We only send you an email when we have a couple of new posts or some important updates to share.

Recent Comments

Open Source Directory

Join the Force!

For the price of one cup of coffee per month:

  • Support the FOSS Post to produce more content.
  • Get a special account on our website.
  • Remove all the ads you are seeing (including this one!).
  • Get an OPML file containing +70 RSS feeds for various FOSS-related websites and blogs, so that you can import it into your favorite RSS reader and stay updated about the FOSS world!