Commands by silbak04 (1)

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

Bitcoin prices from the command line

retrieve the source address used to contact a given host
on multihomed hosts, connected to several networks, could be usefull to know the source address (local ip address) used to reach the target host, this command does not require root priviledges. The command use a TCP socket, if there is any error the command return an empty string, elsewhere return a valid ip address.

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

Watch the progress of 'dd'
need pv (pipe view) : http://www.ivarch.com/programs/pv.shtml

Extract HTTP Passwords in POST Requests

Umount only the NFS related to 'string'
Sometimes, you have a lot of NFS in the server and you can't or shouldn't use umount -a. Whis this command, you only umount the fs related to the 'string'

disable history for current shell session
this will cause any commands that you have executed in the current shell session to not be written in your bash_history file upon logout

Print without executing the last command that starts with...
It happens that sometime you remember that you used a special command short time before and you want to check the command again. WIth this command you can just put the beginning of a command and then bash will look for you and it will print back safely withou executing

grep expression (perl regex) to extract all ip addresses from both ip and ifconfig commands output
It uses the following GNU grep options: "-o" which shows only the matching part of the line and "-P" which allows the use of Perl regular expressions.

Hold off any screensavers/timeouts
Moves the mouse 1 pixel down and to the right, then immediately back again, every 4 minutes. This keeps screensavers from turning on. I have used this extensively and I've never even noticed the mouse movement because it is so subtle.


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: