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

Connect to FreeWifi hotspot (France) and keep the connection active
(In French) Connection aux hotspots FreeWifi, et maintien de la connection active

Compute the average number of KB per file for each dir
Shorter version using --tag

Open Remote Desktop (RDP) from command line having a custom screen size
This example uses xfreerdp, which builds upon the development of rdesktop. This example usage will also send you the remote machine's sound.

Reset hosed terminal,
stty sane resets the tty to basic usable function. The ^J is a newline -- sometimes CR/LF interpretation is broken so use the ^J explicitly.

useful tail on /var/log to avoid old logs or/and gzipped files
with discard wilcards in bash you can "tail" newer logs files to see what happen, any error, info, warn...

Make Kali Linux look less suspicious by making the desktop look more like a windows machine
To revert back to Kali's original desktop. Just redo the same command with no options .

Check whether laptop is running on battery or cable
1 = on ac, 0 = on bat

unbuffered python output
You have a python script that slowly prints output, you want to pipe the output to grep or tee, and you are impatient and want to watch the results right away. Rather than modify your script (making it slightly less efficient), use the -u option to have the output unbuffered.

find all active IP addresses in a network

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.


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: