ExifTool is a free and open-source software program for reading, writing, and manipulating image, audio, and video metadata.

# To extract and view all EXIF metadata from an image or photo:
exiftool image.jpg

# To remove all EXIF metadata from the given files:
exiftool -All= file

# To remove EXIF metadata from images with ".jpg" extensions only
# (makes copies of the original files):
exiftool -all= *.jpg

# Writes Artist tag to image.jpg. Since no group is specified, EXIF:Artist will
# be written and all other existing Artist tags will be updated with the new
# value ("jon").
exiftool -artist=jon image.jpg

# To write multiple tags:
exiftool -artist="Jon LaBelle" -copyright="2015 Jon LaBelle" image.jpg

# To print all meta information in an image, including duplicate and unknown
# tags, sorted by group (for family 1):
exiftool -a -u -g1 image.jpg

# To list meta information in tab-delimited column form for all images in
# directory DIR to an output text file named "out.txt":
exiftool -T -createdate -aperture -shutterspeed -iso DIR > out.txt

# To print ImageSize and ExposureTime tag names and values:
exiftool -s -ImageSize -ExposureTime image.jpg

# To print standard Canon information from two image files:
exiftool -l -canon image1.jpg image2.jpg

# To recursively extract common meta information from files in somedir
# directory, writing text output into files with the same names but with a
# somedir.txt extension.
exiftool -r -w .txt -common somedir

# To save thumbnail image from image.jpg to a file called thumbnail.jpg:
exiftool -b -ThumbnailImage image.jpg > thumbnail.jpg

# To print formatted date/time for all JPG files in the current directory:
exiftool -d "%r %a, %B %e, %Y" -DateTimeOriginal -S -s *.jpg

# To extract image resolution from EXIF IFD1 information (thumbnail image IFD):
exiftool -IFD1:XResolution -IFD1:YResolution image.jpg

# To extract all tags with names containing the word "Resolution" from an image:
exiftool "-*resolution*" image.jpg

# To extract all author-related XMP information from an image:
exiftool -xmp:author:all -a image.jpg

# To extract complete XMP data record intact from a.jpg and write it to out.xmp
# using the special XMP tag:
exiftool -xmp -b image.jpg > out.xmp

# To print one line of output containing the file name and DateTimeOriginal for
# each image in directory somedir:
exiftool -p "$filename has date $dateTimeOriginal" -q -f somedir

# To extract all GPS positions from AVCHD video video.m2ts:
exiftool -ee -p "$gpslatitude, $gpslongitude, $gpstimestamp" video.m2ts

# To save complete ICC_Profile from an image to an output file with the same name
# and an extension of .icc:
exiftool -icc_profile -b -w icc image.jpg

# To generate HTML pages from a hex dump of EXIF information in all images from
# the images_dir directory. The output HTML files are written to the tmp
# directory, which is created if it didn't exist, with names of the form
# "FILENAME_EXT.html".
exiftool -htmldump -w tmp/%f_%e.html t/images_dir

# To increase time photo taken by 1 hour in directory:
exiftool "-AllDates+=0:0:0 1:0:0" directory

# To decrease time photo taken by 1 day and 2 hours on JPEGs only:
exiftool "-AllDates-=0:0:1 2:0:0" -ext jpg

# To change only DateTimeOriginal by -1.5 hours & do not keep backups:
exiftool -DateTimeOriginal-=1.5 -overwrite_original

# To rename all JPEGs according to a DateTimeOriginal recursively:
exiftool '-filename<DateTimeOriginal' -d %Y-%m-%d_%H-%M-%S%%lc.%%e directory -r -ext jpg