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:
Take a screenshot every 2 seconds and save it as a png file
This command are using by me for checking connection with Internet.
Gives not only date but also some interesting status about the System
this command will beep like an alarm for one minute from 18:57. you can change "1857" to your desired time.
you should have alsa-oss package installed, and you should also be root or part of "audio" group.
I'd prefer this one, you have to install espeak to get this running
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@example.com 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.
This is a different version from my original command: Console clock -- Beautiful (http://www.commandlinefu.com/commands/view/7902/console-clock-beautiful )
This one uses Boxes and Figlet.
To install the dependencies on Ubuntu, type in:
sudo apt-get install boxes figlet
To install the dependencies on Debian, type in:
aptitude install boxes figlet
This will show a console clock with Figlet.
This is with the Star Wars font.
Change the -f option to anything else.
Notice: You need Figlet installed for this to work.
To install Figlet on Ubuntu, type in:
sudo apt-get install figlet
To install Figlet on Debian, type in:
aptitude install figlet
This command will automatically clear the old clock time, and show the new clock time.
It will also slightly format it.
Does the same but without a pipe and a new shell.