Commands using read (340)

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

Chmod all directories (excluding files)
+ at the end means that many filenames will be passed to every chmod call, thus making it faster. And find own {} makes sure that it will work with spaces and other characters in filenames.

renames multiple files that match the pattern
Useful when you want to quickly rename a bunch of files.

kill all process that belongs to you
This will probably kill any user sessions and/or ssh connections to other servers you might have active.

Binary clock
Like 7171, but fixed typo, uses fewer variables, and even more cryptic!

Show UDID of iPhone
Display the serial of the iPhone (aka UDID).

change microdvd subtitles framerate
this command example converts to 25 fps subtitles that were originally created for 24 fps movie

grep -v with multiple patterns.
If you wanted to do all in one command, you could go w/ sed instead

Pass TAB as field separator to sort, join, cut, etc.
Use this BASH trick to create a variable containing the TAB character and pass it as the argument to sort, join, cut and other commands which don't understand the \t notation. $ sort -t $'\t' ... $ join -t $'\t' ... $ cut -d $'\t' ...

ssh: change directory while connecting
Useful to create an alias that sends you right in the directory you want : alias server-etc="ssh -t server 'cd /etc && $SHELL'"

Display the size of all your home's directories
Display the size (human reading) of all the directories in your home path (~).


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: