Command Line Snippets

Convert Markdown files to Org Mode using Pandoc

find . -name \*.md -type f -exec pandoc  -f markdown -t org -o {}.org {} \;

Recursively "touch" all files in a directory

find /home/example -print -exec touch {} \;

Mirroring a website with wget

wget -mirror -F -E -k

Generate SSL CSR for Apache

openssl req -new -newkey rsa:2048 -nodes -keyout -out

Generate strong password in terminal

openssl rand -base64 6

Recursively remove subdirectories

For example, subversion's ".svn/" directories

find . -name .svn -print0 | xargs -0 rm -rf

Output list of virtual hosts in apache

apache2ctl -t -D DUMP_VHOSTS

Pretty table formatting in BBEdit

pbpaste | column -t

Change Tab titles in iTerm

To change the tab to say "Gmail"…

echo -ne "\033]0;Gmail\007"

Clearing Varnish Cache

varnishadm -T url.purge .

Setting git editor (to use MacVim)

git config --global core.editor 'mvim -f'

Listing SSH Key Signatures

ls ~/.ssh/*.pub | xargs -L 1 ssh-keygen -l -f

Encrypt file with GPG (PGP)

gpg -ea -r private.doc (via

Author: Jack Baty
Last update : 2016-02-10 Wed 13:09