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:
This is the best way to fix this issue on OS X. If you don't have homebrew installed, now is the perfect time to fix that too. ;-)
An alternative to built-in package manager, keep pandoc in sync with upstream releases.
cut log from row 100 to row 150.
Install the Linux kernel headers for currently running kernel version on Debian-based systems via apt-get
Install Ksuperkey one command in Kubuntu.
You must manually add ksuperkey to autostart in System Settings KDE.
Use ZSH instead of bash, typing .. will move you up one directory, without the need to alias it.
You must have the android sdk installed with 'adb' executable on your system. This is just a way to loop over files in a folder using 'find' to locate and install android apps.
Python virtual environment creation.
Work only with bash and apt-file installed.
When it found an unknow command, it will search for a file named "scribus" (in my example), in a folder named bin and then install the corresponding package.
After installation, it will run the command.
Usefull juste after reinstalling linux and missing lot of package.
This is the first version of the Sublime Text 2 packaging so there might be bugs.
This is a command to be used inside of MS-DOS batch files to check existence of commands as preconditions before actual batch processing can be started. If the command is found, batch script continues execution. If not, a message is printed on screen, script then waits for user pressing a key and exits.
An error message of the command itself is suppressed for clarity purpose.
Like 7172, but much easier.
I used this to mass install a lot of perl stuff. Threw it together because I was feeling *especially* lazy. The 'perl' and the 'module' can be replaced with whatever you like.
Use when aptbackup will not start or you just want to see what's going on.
on a dpkg managed system this PATTERN will help you generate .deb files from source AND remove all the dev libs you had to install. i hate cluttering up my machine with rouge packages and headers.
it would be pretty darn easy on rpm systems as well. i just dont have a rpm managed system to test on right now.
NOTE, you sharp ones will notice that it uninstalls the deb you just made! yeah, but the deb is still there to do with it what you want, like re install it. or you can just grep -v after the diff