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

Lock your KDE4 remotely (via regular KDE lock)
Forgot to lock your computer? Want to lock it via SSH or mobile phone or use it for scheduled lock? TIP: Make a alias for this (e. g. as "lock"). I found some howtos for ugly X11 lock, but this will use regular KDE locking utility. Note that KDE 3 is using utility with another name (I guess with the same argument --forcelock) Tested on Kubuntu 8.10. Stay tuned for remote unlock.

Print just line 4 from a textfile

send kernel log (dmesg) notifications to root via cron
this is helpful because dmesg is where i/o errors, etc are logged to... you will also be able to see when the system reboots or someone attaches a thumb drive, etc. don't forget to set yourself up in /etc/aliases to get roots email.

Monitor all DNS queries made by Firefox

Which processes are listening on a specific port (e.g. port 80)
swap out "80" for your port of interest. Can use port number or named ports e.g. "http"

Get all available packages on Ubuntu (or any distro that uses apt)

Find Duplicate Files (based on size first, then MD5 hash)
for OS X

convert filenames in current directory to lowercase

Print just line 4 from a textfile

sshfs usage
you can use this command for mounting local directory to a remost directory..


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: