Commands tagged metadata (2)

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

Multiple variable assignments from command output in BASH
This version uses read instead of eval.

subtraction between lines
It's allways strange for me to see sed and awk in the same command line if you can avoid it

RTFM function
Some commands have more information on 'info' than in the man pages

Find the package that installed a command

Check if a string is into a variable
Returns true (0) if the string is into $var, or false (1) if not.

Convert CSV to JSON
Replace 'csv_file.csv' with your filename.

cloning partition tables under Solaris

Ping sweep without NMAP
Waits for all pings to complete and returns ip with mac address

count and number lines of output, useful for counting number of matches
Write each FILE to standard output, with line numbers added. With no FILE, or when FILE is -, read standard input.

Find broken symlinks and delete them
If you don't want to delete them, but just want to list them, do $ find -L /path -type l If you want to delete them with confirmation first, do $ find -L /path -type l -exec rm -i {} + Using the -L flag follows symlinks, so the -type l test only returns true if the link can't be followed, or is a symlink to another broken symlink.


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: