### Commands by FreedomBen (3) the last day the last week the last month all time sorted by date votes

• 0
mencoder -speed 2 -o output.avi -ovc lavc -oac mp3lame input.avi
· 2014-11-05 23:57:34
• Moves the mouse 1 pixel down and to the right, then immediately back again, every 4 minutes. This keeps screensavers from turning on. I have used this extensively and I've never even noticed the mouse movement because it is so subtle.

2
while true; do xdotool mousemove_relative 1 1; xdotool mousemove_relative -- -1 -1; sleep $((60 * 4)); done · 2014-03-06 00:04:45 • 1 tar --exclude='patternToExclude' --use-compress-program=pbzip2 -cf 'my-archive.tar.bz2' directoyToZip/ · 2014-02-14 18:05:50 ### What's this? commandlinefu.com is the place to record those command-line gems that you return to again and again. That way others can gain from your CLI wisdom and you from theirs too. All commands can be commented on, discussed and voted up or down. ### Check These Out Delete all git branches except master Delete all your branches except master (useful after archiving branches) [git] Output remote origin from within a local repository Great way to quickly grasp if a locally cloned repository originates from e.g. github or elsewhere. List upcoming events on google calendar Requires googlecl (http://code.google.com/p/googlecl/) Even better when you wrap this in a script and allow the --date=STRING to be$1. Then you can type: whatson "next Thursday" The date string for UNIX date is very flexible. You can also add --cal "[regex]" to the end for multiple calendars.

Recursively remove 0kb files from a directory

escape any command aliases
e.g. if rm is aliased for 'rm -i', you can escape the alias by prepending a backslash: rm [file] # WILL prompt for confirmation per the alias \rm [file] # will NOT prompt for confirmation per the default behavior of the command

I like man pages, and I like using less(1) as my pager. However, most GNU software keeps the manual in the 'GNU Texinfo' format, and I'm not a fan of the info(1) interface. Just give me less. This command will print out the info(1) pages, using the familiar interface of less!

Makefile argument passing
This would allow reference of \$(VAR) (if defined) with the value 'foobar' within the Makefile.

Avoiding history file to be overwritten
If histappend options is set in bash, the file .bash_history will not be overwrite and history list is append to it.

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Create date based backups
This script creates date based backups of the files. It copies the files to the same place the original ones are but with an additional extension that is the timestamp of the copy on the following format: YearMonthDay-HourMinuteSecond