All commands (14,187)

What's this?

commandlinefu.com is the place to record those command-line gems that you return to again and again. 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.

Share Your Commands


Check These Out

Add "prefix" on a buch of files

Edit the /etc/sudoers config file the right way.
'visudo' is installed by default on most Unix-like systems. If not installed, you can get it from the 'sudo' package. 'visudo' will use the text editor found in your $EDITOR variable, whether it's vi, vim, emacs, nano or gedit. After making changes to the /etc/sudoers file, visudo will check for syntax errors, and notify you of them. This is better than 'vi /etc/sudoers', because of this capability. Rule #1 of system administration- if there is a tool that exists for editing config files, use the tool.

Encrypted archive with openssl and tar
Create an AES256 encrypted and compressed tar archive. User is prompted to enter the password. Decrypt with: $ openssl enc -d -aes256 -in | tar --extract --file - --gzip

Hide comments
Hide comments and empty lines, included XML comments,

ASCII art of yourself
Use libcaca to render ascii chars on the webcam input... or don't.

Advanced python tracing
Trace python statement execution and syscalls invoked during that simultaneously

open path with your default program (on Linux/*BSD)
open [path] in the default program, regardless of which Desktop Environment you use (KDE, GNOME, etc.) Works on all "freedesktop.org" compatible desktop environments

Show linux kernel modules dependencies
Use modprobe to list all the dependencies of a certain kernel module. Handy when debugging system issues.

Install pip with Proxy
Installs pip packages defining a proxy

Quick and Temporary Named Commands
* Add comment with # in your command * Later you can search that command on that comment with CTRL+R In the title command, you could search it later by invoking the command search tool by first typing CTRL+R and then typing "revert"


Stay in the loop…

Follow the Tweets.

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.

» http://twitter.com/commandlinefu
» http://twitter.com/commandlinefu3
» http://twitter.com/commandlinefu10

Subscribe to the feeds.

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: