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

Draw kernel module dependancy graph.
parse `lsmod' output and pass to `dot' drawing utility then finally pass it to an image viewer

Check whether laptop is running on battery or cable

Check all bash scripts in current dir for syntax errors
Check all bash scripts in current dir for syntax errors WITHOUT running them.

floating point operations in shell scripts
allows you to use floating point operations in shell scripts

Replace spaces in filename
This command will replace spaces in filename with underscore, for all file in directory that contain spaces.

list ips with high number of connections

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.

Grep all non-ascii character in file
It will highlight non-ascii character in a file. those character can cause problem for some application parsing ascii file.

Remove a range of lines from a file

Scan your LAN for unauthorized IPs
populate the auth.hosts file with a list of IP addresses that are authorized to be in use and when you run this command it will return the addresses that are pingable and not in the authorized list. Can be combined with the "Command line Twitter" command to tweet unauthorized access.


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: