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

Insert a line for each n lines
specially usefull for sql scripts with insert / update statements, to add a commit command after n statements executed.

Touch a file using a timestamp embedded in the file name.
tstouch takes two arguments: a filename containing a timestamp, and an extended regular expression with the parenthesized section matching a timestamp of the form YYYYMMDDhhmm or YYYYMMDDhhmm.ss. It then touches the file with that timestamp.

Update twitter with curl
Same as below, but no quotes are necessary when twitting more than one word

Console clock
Shows a simple clock in the console -t param removes the watch header Ctrl-c to exit

Print number of mb of free ram
This will show the amount of physical RAM that is left unused by the system.

du and sort to find the biggest directories in defined filesystem
This command give a human readable result without messing up the sorting.

urlencoding with one pure BASH builtin
opposite of https://www.commandlinefu.com/commands/view/10014/urldecoding-with-one-pure-bash-builtin ;-)

Quick case-insenstive partial filename search
This is a simple command, but extremely useful. It's a quick way to search the file names in the current directory for a substring. Normally people use "ls *term*" but that requires the stars and is not case insensitive. Color (for both ls and grep) is an added bonus.

GRUB2: set Super Mario as startup tune
I'll let Slayer handle that. Raining Blood for your pleasure.

OpenDns IP update via curl
Your IP is resolved by OpenDns Server (like a caller ID telephone, every server knows who is calling ;-) Change user:password by yours Be Happy


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: