commandlinefu.com is the place to record those command-line gems that you return to again and again.
Delete that bloated snippets file you've been using and share your personal repository with the world. 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.
If you have a new feature suggestion or find a bug, please get in touch via http://commandlinefu.uservoice.com/
You can sign-in using OpenID credentials, or register a traditional username and password.
First-time OpenID users will be automatically assigned a username which can be changed after signing in.
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
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:
If you are behind a proxy server and have to authenticate with proxy server to browser web pages then you have to pass proxy server address and its port number along with user credentials to curl to got GET the page using curl. Example : "curl -U srikanth -x 167.85.103.70:8080
Depends on GET. You can also replace GET with curl, or `wget -qO -` if GET isn't available.
add this alias in .bashrc to fast check the ip address of your modem router
alias myip="curl -s http://myip.dk | grep '' | sed -e 's/]*>//g'"
Simply displays your current working directory. Helps when you are buried deep in /etc or some other obscure place.
If somehow if you get more than 1 same name rpm package install, then it cannot be removed by using simple rpm -e as it gives you more than one rpm matches error. The --matches will help to remove all the same name rpm packages.
Once Enabled this command enables a trail of all processes on the system. As the name suggested auditing for Solaris machines.
BSM creates a number of files in the /etc/security directory.
add |sh when you agree the list, I often use that method to prevent typos in dangerous or long operations
Telnet will make a tcp connection to a remote ip/port to test connectivity. If it times out, it's not reaching the host (maybe the firewall is blocking it). If connection is refused, it's reaching the host, but either the service is not listening on that port, or it's locked.
sh as:
#! /bin/sh
while [ 1 -ne 6 ]; do
pid=`ps -ef | grep -v "grep" | grep "trans_gzdy" | cut -c10-17`
ps gv $pid | head -2
sleep 1
done
check changes of RSS.
arguably better than using the driver interface. lots of potentially cool stuff to be done w/ the dcop client.
Handy for those times you need to paste a file path in an IDE or some other app.
sudo apt-get install xclip
Then, for convenience, alias xclip to 'xclip -selection c' so you can just do something like realpath . | xclip