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:
Requirements: curl, grep, awk, internet connection with access to wikipedia
If you can make shorter version of this listgetter, you are welcome to paste it here :)
Did some research and found the previous command wrong, we don't kill a zombie but its parent. Just made some modifcation to khashmeshab's command.
Taken from apticron and modified.
This was tested on Ubuntu 12.04 (Precise) LTS Server. It returns the name of the symlink within /dev/disk/by-id for the physical drive you specify. Change /dev/sda to the one you want, and replace ata- with scsi- or the appropriate type for your drive.
I used this to pre-configure grub-pc during a non-interactive install because I had to tell it which disk to install grub on, and physical disks don't have a UUID such as that blkid provides.
Oneliner to get domain names list of all existing domain names (from wikipedia)
Command used to know if we are working on a virtual or physical machine. This command will use the dmidecode utility to retrieve hardware information of your computer via the BIOS. Run this command as root or with sudo.
Let's you examine, for example, whether infrastructure folks really provisioned the correct setup.
Java 64-bit checklist
1. check if hardware is 64-bit capable by looking for lm flag
grep -l 'flags.*\<lm\>' /proc/cpuinfo
2. check if kernel is 64-bit
getconf LONG_BIT | grep '64'
3. check if java is 64-bit (simply look for 64-bit in output - if present, then it is, if absent, then it is 32-bit)
Trick to avoid the form:
grep process | grep - v grep
Place in .bash_profile
A lot of files in one dir is not so cool for filesystem.
This command downloads the actual 20 most popular pictures from the website 500px. It uses a random name due to the fact the the pictures in 500px are stored with the same name.
UPDATED: doesn't work if no referrer is specified: --referer='http://500px.com/'
Returns the IP, broadcast, and subnet mask of your interfaces absent any other extraneous info.
I know it's a bit lame, but I've created an alias for this when I *quickly* want to know what a system's IP is. Small amounts of time add up :)
get the ip address on your LAN
get the ip address on your LAN
command for conky. To update a random command for each 300 sec from commandline.com
Old Sys5 system and SUN computers don't have the -H option. Adding /dev/null forces grep to use the multi-file output and report the file name.
Take a screenshot, give $1 seconds pause to choose what to screenshot, then upload and get URI of post in ompdlr.org
Create a .png from output command or whatever, the upload and give URI from ompdlr.org