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.
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:
Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:
This command is almost the same as 'ls -a', but it does not display the current dir (.) or parent (..)
Gnu grep allows to restrict the search to files only matching a given pattern. It also allows to exclude files.
Appropriate for today.
Assuming we have a disk image, created by dd if=/dev/sda of=image.dd we can check the image's partition layout with fdisk -ul image.dd, then substitute "x" with starting sector of the partition we want to mount. This example assumes that the disk uses 512Byte sectors
If you used to do `vlc /tmp/Flash*`, but no longer can't, this is for you.
Neat idea! This variation works on FreeBSD.
Ctrl+L just rolls up your screen. Try Ctrl+Shift+X if you dont want to get confused between what was before on the screen, and what would be there when you run the next command
as alternative to cd $OLDPWD
When you need a quick ref guide while troubleshooting Apache|NGINX error|access logs.
Description by segments delimited by pipe (|)
1. List all git branches
2. Exclude master
3. Trim output and remove display elements such as * next to current branch
4. Repeat branch name after a space (output on each line: branch_name branch_name)
5. Prepend each line with the git tag command
6. Execute the output with bash
Useful to archive files once a day:
cp file file.$(date --iso)
Quick grab of the data to the new disk!
This is a simple command which makes electricsheep render directly to your background
Alias to play flash videos with mplayer. You can replace mplayer with your favorite video player.
This alias supports Chrome & Firefox's way of handling the flash plugin. It will play all the videos in the cache. Note that certain videos might never make it to the cache, if the publisher ask for them not to: they will just be loaded in RAM.
A variant if you're just interested in playing the audio, for example for a music :
alias flashmusic="mplayer -vo null \$(find /proc/\$(pgrep -f 'libgcfl|libflashplayer')/fd/ -printf '%p %l\n' |grep FlashXX | cut -d\ -f1)"
Removes comments and blank lines from configuration files, leaving only settings
optionally you can add
|cut -d' ' -f2|uniq
to the end of the command line.