Ubuntu/Debian Notification After Command Has Run

If you’re about to run a process that is going to take a considerable amount of time to execute, it is convenient to have that process run without your supervision. And having some type of notification as to when the … Continued

Git; Get All Branches Last Commit Date and Time

for k in git branch | perl -pe s/^..//; do echo -e git show –pretty=format:”%Cgreen%ci %Cblue%cr%Creset” $k — | head -n 1\\t$k; done | sort -r The set of piped commands above produces easy-to-read output of all your repo’s branch … Continued

Count IP Occurrences in Apache / Nginx Logs

This command will parse an Apache or Nginx log file and print-out the 50 highest occurring IP’s, along with the number of occurrences, to the shell prompt. machine:~ User$ cat access.log | awk ‘{print $1}’ | sort -n | uniq … Continued

GIT Using SSH to Push Remote to Server

On the server terminal, type: git remote add origin ssh://user@domain.com:22/home/user/remote.git The name of your remote repo will be ‘origin’. ‘user’ is your user name, ‘domian.com’ is your domain or IP address. ‘:22’ is the port number used to connect to … Continued