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

Put a console clock in top right corner
This puts a clock in the top right of the terminal. This version doesn't use tput, but uses escape codes

Transcode .flac to .wav with gstreamer
Takes all .flac directories, feeds them into a simple transcode pipeline to spit out .wavs with the same name (but correct extension).

Set laptop display brightness
Run as root. Path may vary depending on laptop model and video card (this was tested on an Acer laptop with ATI HD3200 video). $ cat /proc/acpi/video/VGA/LCD/brightness to discover the possible values for your display.

Convert from a decimal number to a binary number

Install pip with Proxy
Installs pip packages defining a proxy

Disconnect a wireless client on an atheros-based access point
This command will disconnect the user whose mac was specified from the current list of clients from the wireless network when the network card is working in access point mode. Works on atheros-based access points which use the madwifi driver (not sure, but don't think it will work on access points which are not atheros-based, as it uses the atheros's iwpriv extensions). It will not prevent the user from reconnecting to the network, but may force the user to roam to another AP, with stronger signal.

Arch Linux: Always install software without asking
Adding this alias to ~/.bashrc or, better yet, the system-wide /etc/bash.bashrc (as in my setup) will make it possible to not only run pacman as any user without needing to prepend sudo but will also ensure that it always assumes that the user knows what he or she is doing. Not the best thing for large multi-user enterprise setups at all to say the least, but for home (desktop) use, this is a fantastic time-saver.

check open ports without netstat or lsof

Synchronize both your system clock and hardware clock and calculate/adjust time drift
Do not run this command if you already have ntpd running! This needs to run as root, for example with sudo: $ sudo ntpdate pool.ntp.org && sudo hwclock --systohc && sudo hwclock --adjust This command will fetch accurate time from NTP servers and synchronize your system clock, then it will use the system clock to synchronize your hardware clock, and will calculate the time drift.

Take screenshots with imagemagick
Now try this. Ones you see small cross arrow, double click on any window you like to make a screenshot "selectively".


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: