commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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.
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:
Watch the temperatures of your CPU cores in real time at the command line. Press CONTROL+C to end.
GORY DETAILS: Your computer needs to support sensors (many laptops, for example, do not). You'll need to install the lm-sensors package if it isn't already installed. And it helps to run the `sensors-detect` command to set up your sensor kernel modules first. At the very end of the sensors-detect interactive shell prompt, answer YES to add the new lines to the list of kernel modules loaded at boot.
Just replace 15m with desired time. no suffix or 's' for seconds; 'h' for hours
You need to be root or in audio group to write to /dev/dsp.
You may use yes | head -n 2000 for about 1 second beep.
Wrote this as echo -e '\a' not always works as desired (ex. visual bell)
requires sp-auth installed
This command will auto kill sp-sc after vlc is closed, so u wont have to do it manually
A shorter version
Turn your terminal into digital clock.
Just a simple way without the need of additional tools. Of course, replace eth0 with your IF.
until (ssh [email protected] 2> /dev/null); do date; sleep 15; done
In this case will execute "date" then "sleep 15" until we are able to ssh into server, such as after a reboot
Could also be like:
until ( ping 10.1.1.39 1> /dev/null); do echo "server 10.1.1.39 is down"; sleep 15; done
Countdown clock - Counts down from $MIN minutes to zero.
I let the date command do the maths.
This version doesn't use seq.
A nice way to use the console in full screen without forget the current time.
you can too add other infos like cpu and mem use.
Does the same but without a pipe and a new shell.
sends notification msg within repeated intervals of time to notify-send ;)
Just for fun.
Mutes the speakers after an hour, in case you fall asleep watching a video...
I used curl instead of lynx.
No need for a colon, and one less semicolon too. Also untested.
There is no need for variables. I also added sleep to reduce cpu usage, however I didn't test it.
Of course, a fifo is required for piloting the fade out of another song, but with a few bash function, we can mix music in bash like :
crossfadeIn > mplayerfifo1 & crossfadeOut > mplayerfifo2
loop 0 10 > mplayer fifo1
can also be invoked as 'exipick -zi | exim -dM' if you do not need/want the delay between flushes.
I often use it to find recently added ou removed device, or using find in /dev, or anything similar.
Just run the command, plug the device, and wait to see him and only him