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:
-secgrp no for distribution
-scope u for distribution
This one is for OS X users: sort -R and shuf aren't available in Lion (10.7.5)
Sets the exec bit on a file.
I doubt this works with other than bash, but then again, I havent tried.
The 'yes' utility is very simple, it outputs a hell of a lot of 'y's to standard input.
The '!!' command means 'the last command'. So this one-lines inputs a lot of y's into the last command, aggressively agreeing to everything. For instance, when doing apt-get.
This command deletes all but the first occurrence of a duplicate file in one or more folders.
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.
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)
For each cpu set mask and then monitor your cpu infos. Temp,load avg. etc.
For example for 2nd cpu or 2nd core
taskset 0x00000002 yes > /dev/null &
For example for 3rd cpu or 3rd core
taskset 0x00000004 yes > /dev/null &
For example for 4th cpu or 4th core
taskset 0x00000008 yes > /dev/null &
Monitor your cpu temp with this command if you want
watch -n1 "acpi -t"
Load avg. from top command
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.
simple bash one liner to pass multiple arguments to command one by one. optional yes/no pipe at beginning of command
connects to host via ssh and displays the live transfer speed, directing all transferred data to /dev/null
needs pv installed
Debian: 'apt-get install pv'
Fedora: 'yum install pv' (may need the 'extras' repository enabled)
Rainbow, instead of greys
Maybe you know shorter ?