Underscan Published on September 16, 2008
by Underscan

Underscan's blog

Browse posts
[RFH] Identifiying landscape / portrait format images via CLI
Posted on December 21, 2008
2 comments (latest 11 months ago)
The year 2008 in photographs - boston.com
Posted on December 18, 2008
8 comments (latest 11 months ago)
Does Ipernity scale?
Posted on December 6, 2008
3 comments (latest 11 months ago)
Possible bug: different license for visitors and members for blog posts?
Posted on September 16, 2008
6 comments (latest 14 months ago)
ExiftTool and "sensitive" meta data revisited
A Sunday At Britzer Garden
Posted on April 22, 2008
1 comment (latest 19 months ago)
Group Administration Function Needs An Overhaul - Urgently
Posted on April 14, 2008
6 comments (latest 19 months ago)
10000+ visits
Posted on April 12, 2008
10 comments (latest 19 months ago)
Doc descriptions taken from Wikipedia
Posted on March 12, 2008
10 comments (latest 19 months ago)

Keyword tags

linux
exif
software
privacy

More information

This post is public
Attribution + no Derivs
  1. Read 195 times

ExiftTool and "sensitive" meta data revisited

Tuesday September 16, 2008 at 11:10AM

Since I had posted my first thoughts on how to remove "sensitive" meta data from files before uploading them back in February, I have modified the command a little since and made it a permanent alias so it is easier to execute.

This is what it looks now in my .bash_aliases:

alias strip_exif='exiftool -all= *.jpg; find . -maxdepth 1 -name "*jpg" -execdir exiftool -overwrite_original -tagsfromfile {}_original -make -model -exposuretime -fnumber -flash -iso -lens -focallength -orientation -datetimeoriginal {} \;; rm *original'

For this alias to be found by bash at all it is necessary to add/uncomment the following lines in the .bashrc:

if [ -f ~/.bash_aliases ]; then
. ~/.bash_aliases

What this alias "strip_exif" does is:

  1. Remove all meta data from the image files (with jpg extension) from the directory the command is executed from. By default ExifTool will make a backup copy of the modified files. They can be found in the same directory with an appendend _original.
  2. Using the find-command I retrieve all image filenames (again looking for the jpg extension) in the current directory (that's why I specifiy the maxdepth parameter) and then pass those on to ExifTool which then processes one by one. It simply copies the defined meta data fields from the _orignal backup files. (For an extensive list of available meta data have a look at man Image::ExifTool::TagNames and do a /EXIF Tags)
  3. Finally the backup files are removed leaving me with the directory listing that I started out with but with only a fraction of the meta data in the files.

Maybe this is helpful to someone. :)

Add your comment

Reply to this comment

Edit your comment

Please sign in to post a comment Sign in now?


rss Latest comments – Subscribe to the feed of comments related to this post.

 

Català | Čeština nové | 中文 | Deutsch | English | Español | Esperanto | Ελληνικά | Français | Galego | Italiano | Nederlands | Português | More...