Command Line

Bash


Let's Encrypt certificates

  1. Stop apache2
  2. certbot --authenticator standalone -d $domain.$tld,www.$domain.$tld certonly


JPEG Manipulation

Use identify to see date when photo was taken:

identify -verbose {picture.jpg} | grep exif:DateTimeOriginal

To change DateTimeOriginal:

jhead -dsYYYY:mm:dd {picture.jpg}

... or ...

jhead -tsYYYY:mm:dd-HH:MM:SS {picture.jpg}

... to change date + time.

(Install jhead on ubuntu: sudo apt install jhead)


Mirror Site

Mirror entire site:

wget --mirror [URL]

... mirror site, but don't mirror gif,jpg and png files:

wget --mirror -R gif,jpg,png [URL]


Which programs listen on which ports

sudo lsof -i -P -n | grep LISTEN


Show reserved ports, windows

netsh interface ipv4 show excludedportrange protocol=tcp