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

get total of inodes of root partition

quickly change all .html extensions on files in folder to .htm

exec chmod to subfiles
Using `-exec cmd {} +` causes find to build the command using all matching filenames before execution, rather than once per file.

run a command from within vi without exiting
":! ls -l " results in listing the files in the current directory. pressing "enter" will get you back into vi.

A function to find the newest file in a directory

Replace Caps-lock with Control-key
You can return to defaults with "setxkbmap". More here: http://dailycli.blogspot.com/2009/12/xmodmap-replace-caps-lock-with-left.html

Write comments to your history.
A null operation with the name 'comment', allowing comments to be written to HISTFILE. Prepending '#' to a command will *not* write the command to the history file, although it will be available for the current session, thus '#' is not useful for keeping track of comments past the current session.

Spy audio, it only records if detects a sound or noise
It find out the mic recording level at the moment of run the command and if a noise level is higher it starts to record an mp3 file. The resulting file will have only the sounds not the silences.

Are the two lines anagrams?
This is just a slight alternative that wraps all of #7917 in a function that can be executed

Load your [git-controlled] working files into the vi arglist.
Branch name may be substituted, of course.


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: