commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
Put in your path (.bashrc or similar).
Then instead of running '$ git-commit -m ' use '$ git-random'
Uses the command ts in order to add a timestamp on each line. This command is provided in the moreutils package on Debian, and you may need libtime-duration-perl to be able to format the date.
Commandline perl filter for, using a production.log from a rails app, display on realtime the count of requests grouped by "seconds to complete" (gross round, but fair enough for an oneliner) :)
Use the excellent sensiblepasswords.com to a generate random (yet easy-to-remember) password every second, and copy it to the clipboard. Useful for generating a list of passwords and pasting them into a spreadsheet.
This script uses "madebynathan"'s "cb" function (http://madebynathan.com/2011/10/04/a-nicer-way-to-use-xclip/); you could also replace "cb" with
xclip -selection c
Remove "while true; do" and "; done" to generate and copy only 1 password.
(follow with next command)
tail -f from.log | colorize.pl +l20:".*" &
Use with http://www.commandlinefu.com/commands/view/10031/intercept-monitor-and-manipulate-a-tcp-connection. - can use to view output of tees that send traffic to files - output will be interwoven with red for sent traffic and green for received.
get colorize.pl from http://www.flinkmann.de/71-1-Colorizepl.html
A pretty nice display of processes.
script -f /tmp/foo will place all output of the terminal, including carriage returns, to a file. This file can be tail dash-eff'ed by one or more other terminals to display the information of the main terminal. Good way to share one's screen on short notice.
Note: This produces a very accurate output, but that includes depending on the size of your terminal to be the same. You can clear screens or even resize the terminal for others using this function; I use it in conjunction with the "mid" command in my list.
This shell function uses curl(1) as it is more portable than wget(1) across Unices, to show what site a shortened URL is pointing to, even if there are many nested shortened URLs. It is a refinement to www.commandlinefu.com/commands/view/9515/expand-shortened-urls to make it better for use in scripts. Only displays final result.
List all files in a directory in reverse order by modified timestamp. When piped through tail the user will see the most recent file name.
Takes a directory name as an argument (defaults to current directory if no arguments are given). Prints the newest file in the directory.
new way to replace text file with dd,faster than head,sed,awk if you do this with big file
Decrypt MD5 , replace 1cb251ec0d568de6a929b520c4aed8d1 with the MD5 string you want to decrypt
Encrypt any text to MD5 , replace text with the string you want to convert to MD5
after kernel build with make deb-pkg, I like to install the 4 newest packages that exist in the directory. Beware: might be fewer for you....
Tail is much faster than sed, awk because it doesn't check for regular expressions.
Maybe very limited in its applicability but could be of use at times.
like #9295, but awkish instead of perlish
say only processes a complete file, at eof, so following a file isn't possible. Quick and dirty perl oneliner to feed each line from the tail -f to say. Yes, expensive to lauch a new process each line.
This little ditty was prompted by a discussion on how horrible it is to use VoiceOver on ncurses programs such as irssi.
Silly approach, but easy to remember...