Commands by skytux (1)

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.

Share Your Commands


Check These Out

Watch the progress of 'dd'
The previously-posted one-liner didn't work for me for whatever reason, so I ended up doing this instead.

create thumbnail of pdf

Insert a line for each n lines
specially usefull for sql scripts with insert / update statements, to add a commit command after n statements executed.

print all except first collumn

Plays Music from SomaFM
This command asks for the station name and then connects to somafm, Great for those who have linux home entertainment boxes and ssh enabled on them, just for the CLI fiends out there ( I know I'm one of them ;) Also, don't forget to add this as alias(ie alias somafm="read -p 'Which Station? "; mplayer --reallyquite -vo none -ao sdl http://somafm.com/startstream=${REPLY}.pls")

GREP a PDF file.
This is a good alternative to pdf2text for Ubuntu. To install it: sudo apt-get install python-pdfminer

Better way to use notify-send with at or cron
we don't need to export variables to set a env to a command, we may do this before the command directly

Insert a line at the top of a text file without sed or awk or bash loops
Yet another way to add a line at the top a of text file with the help of the tac command (reverse cat).

draw mesh

save date and time for each command in history
for the change stay in your history file , export command by writing it into your .bashrc


Stay in the loop…

Follow the Tweets.

Every new command is wrapped in a tweet and posted to Twitter. Following the stream is a great way of staying abreast of the latest commands. For the more discerning, there are Twitter accounts for commands that get a minimum of 3 and 10 votes - that way only the great commands get tweeted.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

Use your favourite RSS aggregator to stay in touch with the latest commands. There are feeds mirroring the 3 Twitter streams as well as for virtually every other subset (users, tags, functions,…):

Subscribe to the feed for: