Skip to content

Instantly share code, notes, and snippets.

@bhargavg
Last active August 29, 2015 14:05
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bhargavg/b804d0d3149f877fcdc4 to your computer and use it in GitHub Desktop.
Save bhargavg/b804d0d3149f877fcdc4 to your computer and use it in GitHub Desktop.
Unix / Linux / Mac commands
Diff two directories
====================
diff -qur --exclude="bin" --exclude="gen" DIR_1 DIR_2
-OR-
diff --brief \ # -q
--unified \ # -u
--recursive \ # -r
DIR_1 DIR_2
List programs running on port
=============================
http://stackoverflow.com/a/21295146/815540
sudo lsof -i -n -P | grep TCP
List directory contents
=======================
tree -L 1 #up to 1 level depth
Git list only conflict files
============================
git diff --name-only --diff-filter=U
Git add only tracked files
==========================
git add -u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment