Source: http://www.pitt.edu/~naraehan/2015-10-14-commandline-magic.pdf