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:
I did not come up with this one myself, but found this somewhere else several months ago.
My first command :) I made this command to log public addresses of a virtual interface who connects random VPN servers around the world.
The original command is great, but I often want to prepend to every line.
Shows the OS X applications downloaded from App Store. Doesn't include manually added apps.
Took one of the samples, added capitalization and removes in between spaces.
The final "echo" is just for readability.
set BLOCK to "title" or any other HTML / RSS / XML tag and curl URL to get everything in-between e.g. some text
Take a list of words and let mpv play the pronunciation-file from gstatic. Inspired by http://www.commandlinefu.com/commands/view/12574/download-englishword-pronounciation-as-mp3-file.
Optionally, pipe the output into http://sed.sourceforge.net/grabbag/scripts/html2iso.sed
Or: wget -qO - http://www.asciiartfarts.com/random.cgi | sed -n '//,//p' | sed -n '/
Quickly remove the conflicting line (key) from current users known_hosts file when there is an SSH host conflict. Very nice when you get tired of writing out full commands. Ideally you would place this into your .bash_profile
Usage: rhost [n]
Example: rhost 33 (removes line 33 from ~/.ssh/known_hosts)
Function assumes the $HOME exists, you could alternatively use "~/.ssh/known_hosts"
Mac OSX likes a space for sed -i "$1" d
becuase im lazy and cant be bothered looking at the tv guide to choose a channel , any improvments or comments appreciated
uses just one sed
Automatically drops mount points that have non-numeric sizes (e.g. /proc). Tested in bash on Linux and AIX.
I use this with alias:
alias lsl="ls -1F | grep @$ | sed 's/@//' | column"
Limitation: This will also list files that happen to have an @ at the end of the filename.
I use this with alias:
alias lsl="ls -1F | grep @ | sed 's/@//' | column"
find the uptime and convert in minutes, works with AIX and Linux too
Recursively list all files in the current directory & get their md5sum, even if the filename has bad characters.
dumpfile is a CSV file, which its 1st field is a phone number in format CC+10 digits
Empty lines are deleted, before the output in format "prefix,ocurrences"
grep по ps aux
show directory three