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

Check if a process is running
Send signal 0 to the process. The return status ($?) can be used to determine if the process is running. 0 if it is, non-zero otherwise.

list files recursively by size

Replace space in filename
This commands removes space from all the files with specific extension. I've specifed *.jpg as an example.

Output Detailed Process Tree for any User
An easy function to get a process tree listing (very detailed) for all the processes of any gived user. This function is also in my http://www.askapache.com/linux-unix/bash_profile-functions-advanced-shell.html

Extract track 9 from a CD
Using mplayer to extract audio file from a CD

connect via ssh using mac address
Connect to a machine running ssh using mac address by using the "arp" command

convert UNIX timestamp to UTC timestamp
date -ud @1320198157

Quick find function
A function that allows you to perform a case-insensitive search in the current directory, and directories in the current directory (but no further), for files containing the first argument anywhere in their names.

Do a search-and-replace in a file after making a backup

Removes file with a dash in the beginning of the name


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: