Skip to content

123Unix!com

Easy Automation is here

  • About
  • Ask a Question
  • Automation Services
  • About
  • Ask a Question
  • Automation Services

Yearly Archives: 2012

  • Home
  • 2012

Multiple –exclude options to tar

The tar’s “–exclude=PATTERN” option has always had me perplexed. As this is mostly intended for automation scenarios, I have never paid much attention to this option resorting to its more “pro-batch” variant “–exclude-from FILE”.

But today, as I went about making some backups I thought it’s enough, I need to learn how to use this option effectively. Having realized that the documentation on the matter is quite lacking, I decided to make a simple experiment.

Here are the commands I typed (in a bash terminal) to learn more about the “–exclude=PATTERN” option:
Read More

  • 8 Aug, 2012
  • (0) Comments
  • By Alex
  • Tools

Poor symlinks at DreamHost

DreamHost has once again introduced changes (Apache upgrade?) to symlink handling.
Read More

  • 23 Mar, 2012
  • (0) Comments
  • By Alex
  • /var/log

Clean up EXIF tags in digital photos with 1-liner

Use the following one-line script to control witch EXIF data to leave in the photos published online:

exiftool -P -overwrite_original -all= -tagsFromFile @ -ExposureTime -MeteringMode -Flash -FocalLength -FocalLengthIn35mmFormat -FocusDistance -VibrationReduction -FocusMode -CreateDate -DateTimeOriginal -ISO -FNumber -UserComment -copyright='(c)2011, Alexander Shcheblikin' -artist='Alexander Shcheblikin' -model="Sasha's DX dSLR" _DSC*jpg

This should all be entered on one line (note: the dashes which hang over the ends of the lines must actually be adjacent to the command line switches following them).

This is a power tool affecting multiple files at once and it will process all the files matching _DSC*jpg pattern in the current directory.

To retain original files remove the -overwrite_original parameter

exiftool is available natively in Linux/UNIX as a Perl library and a front-end script and as a standalone executable for Windows and a package for Mac OS X.

  • 7 Feb, 2012
  • (0) Comments
  • By Alex
  • Tools