Hide

What's this?

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.


Get involved!

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.

Universal configuration monitoring and system of record for IT.
Hide

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:

Hide

News

May 19, 2015 - A Look At The New Commandlinefu
I've put together a short writeup on what kind of newness you can expect from the next iteration of clfu. Check it out here.
March 2, 2015 - New Management
I'm Jon, I'll be maintaining and improving clfu. Thanks to David for building such a great resource!
Hide

Top Tags

Hide

Functions

Psst. Open beta.

Wow, didn't really expect you to read this far down. The latest iteration of the site is in open beta. It's a gentle open beta-- not in prime-time just yet. It's being hosted over at UpGuard (link) and you are more than welcome to give it a shot. Couple things:

  • » The open beta is running a copy of the database that will not carry over to the final version. Don't post anything you don't mind losing.
  • » If you wish to use your user account, you will probably need to reset your password.
Your feedback is appreciated via the form on the beta page. Thanks! -Jon & CLFU Team

Get memory total from /proc/meminfo in Gigs

Terminal - Get memory total from /proc/meminfo in Gigs
free -g
2011-11-14 22:43:38
User: joedistro
Functions: free
0
Get memory total from /proc/meminfo in Gigs

Alternatives

There are 8 alternatives - vote for the best!

Terminal - Alternatives
awk '( $1 == "MemTotal:" ) { print $2/1048576 }' /proc/meminfo
memnum=$(awk '{ print $2 }' /proc/meminfo |head -n1); echo "$memnum / 1024 / 1024" | bc -l
2011-11-08 16:28:25
User: wekoch
Functions: awk bc echo head
-2

Probably more trouble than its worth, but worked for the obscure need.

awk '{ printf "%.2f", $2/1024/1024 ; exit}' /proc/meminfo

Know a better way?

If you can do better, submit your command here.

What others think

Whilst Rolex comes with the actual http://www.rolexreplicasonline.us/ rolex replica and also the Explorer II because their own main GMT wrist watches, the actual Rolex Sky-Dweller will it a bit in a http://www.rolexreplica.me.uk/ rolex replica sale way, providing another GMT view, however by having an sign disk as opposed to the hands. The look of the disk offers demonstrated a little questionable however continues to be efficient. For many enjoyable, all of us performed close to along with http://www.rolex-replica-uk.co.uk/ rolex replica uk alternations towards the Rolex Sky-Dweller for any http://www.hublotreplicauk.co.uk/ hublot replica uk right here. As a whole, the actual open up GMT disk is actually incorporated regarding in addition to you could wish, having a beveled advantage eye-port along with a good round style which http://www.khaosan-hotels.com/popup/superior.html rolex replica increases the make up from the view. Immediate traditional. Possibly not really, however that is certainly http://www.replicawatch.us.com/ rolex replica. My personal favorite from the more recent Rolex Sky-Dweller versions may be the research 326139 within 18k whitened precious metal having a dark call. The actual GMT disk is actually silvered and also the whole call is quite legible.

Comment by hoowei 7 weeks and 6 days ago

Your point of view

You must be signed in to comment.