Remove Exif info in jpg image under command line

Exif, stands for Exchangeable image file format, which we usually use to recognize the camera manufacturer, model, exposure time in a digital photo, it is a standard that specifies the formats for images, sound, and ancillary tags used by digital cameras (or digital devices in nowadays, like smart phones and tablets), scanners and other systems handling image and sound files recorded by digital cameras.

Exif in JPEG image example from Wikipedia:

Exif can help us know more about the photos and audios, but may also leaks the valuable and privacy info if you don’t want to let others know that you just want to share pictures with others, it will also cost a small disk space, but if you don’t need it or you don’t want it, it’s also a waste of disk space, so you may want to remove that info like me in some situation. Here is the steps to remove Exif under command line.

Install exiftool:

$ sudo pkg install p5-Image-ExifTool # FreeBSD
$ sudo apt-get install libimage-exiftool-perl # Debian / Ubuntu based GNU/Linux
$ sudo yum install perl-Image-ExifTool # RedHat / Fedora based GNU/Linux

Make sure you can now use exiftool:

$ exiftool -ver # show the installed version of exiftool

If you would like to see the current exist info, use this command, filename.jpg is the picture you want to manipulate:

$ exiftool -all filename.jpg

Now you can remove Exif info:

$ exiftool -all= filename.jpg

By default, it will backup your file to filename_oringinal, like filename.jpg -> filename.jpg_original, so you don’t need to worry about the backup, if you don’t want it, you can also add parameter -overwrite_original to prevent to backup file been generated.

After you remove the Exif info, you will find the modified file be a little bit smaller now.

$ exiftool -all= filename.JPG
1 image files updated

$ ls -l
-rw-r--r-- 1 peter peter 1609796 Apr 24 16:09 filename.jpg
-rw-r--r-- 1 peter peter 1614079 Apr 24 16:08 filename.jpg_original

If you take a look at its info, you will find that there are only some basic info remaining:

$ exiftool -all filename.jpg
ExifTool Version Number : 10.10
File Name : DSC_0470.JPG
Directory : .
File Size : 1572 kB
File Modification Date/Time : 2016:04:24 16:09:43+08:00
File Access Date/Time : 2016:04:24 16:09:43+08:00
File Inode Change Date/Time : 2016:04:24 16:09:43+08:00
File Permissions : rw-r--r--
File Type : JPEG
File Type Extension : jpg
MIME Type : image/jpeg
Image Width : 3920
Image Height : 2204
Encoding Process : Baseline DCT, Huffman coding
Bits Per Sample : 8
Color Components : 3
Y Cb Cr Sub Sampling : YCbCr4:2:0 (2 2)
Image Size : 3920x2204
Megapixels : 8.6

That’s all.

常用 Public DNS resolver 清單整理 (IPv4)

目前還沒有常在使用 IPv6, 這邊只列出一些常用的 IPv4 Public DNS Resolver

預設情況 DNS 經常都是優先選用 ISP 所提供的,再把這些 DNS 當作備援使用,或是 ISP 提供的 DNS 速度太慢了就會另外找一些速度比較快的替代方案,而這些 DNS 多半強調能提供更快速以及更可靠的域名解析,或宣稱保護使用者的隱私、或提供像是惡意網站或是成人網站、廣告過濾等功能,在你連到特定網站前就已經先幫你作過濾,這類的 DNS 可以提供比單純的 DNS 更安全的上網環境,部份廠商除了免費版以外也另外提供額外的付費服務,不僅要提供個人使用者更安全的上網環境,更進一步提供企業網路付費的 DNS 過濾服務,詳細資訊可以參考該 DNS 官方提供的資訊

Public DNS — Google Developers  ,由 Google 所提供的 DNS 服務,簡單好記

  • — the Internet’s Fastest, Privacy-First DNS Resolver ,由知名的 CDN 服務供應商 Cloudflare 鎖提供的服務,主打隱私保護及高效能


AdGuard DNS,由廣告封鎖服務 AdGuard 提供,預設包含封鎖追蹤、廣告及釣魚網站阻擋等功能在內,同時也主打隱私保護:


AdGuard 同時也提供家庭保護模式,額外阻擋成人網站:


OpenDNS IP Addresses | OpenDNS,Open DNS 提供兩種免費方案,Home 及 Family Shield ,Family Shield 多了成人網站阻擋: