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

grep on IP range from maillog

Terminal - grep on IP range from maillog
egrep '183\.([0-9]|(1[0-6]|2[0-3]))' -J /var/log/maillog*
2010-10-17 21:44:57
User: wazigster
Functions: egrep
0
grep on IP range from maillog

Useful for grepping an IP range from the maillog. When for instance dealing with a spam-run from a specific IP range, or when errors occur from or to a specific IP-range.

In the example above the IP range 183.0.0.0/10 (183.0.0.0 - 183.63.255.255)

To grep the IP range 124.217.224.0/19 (124.217.224.0 - 124.217.255.255) from the maillog:

egrep '124\.217\.2(2[4-9]|[34][0-9]|5[0-5])' -J /var/log/maillog*

NOTE: the location of the maillog may vary based upon operating system and distribution.

Alternatives

There is 1 alternative - vote for the best!

Terminal - Alternatives

Know a better way?

If you can do better, submit your command here.

What others think

Green bags fit the innovating life style; the current motto right now can be 'go green'. By making use of these simple and easy and used bags, all of us lessen the damage which normal papers and also plastic material bags have on the surroundings.Here a few facts regarding how plastic material bags influence our environment:-Plastic bags throughout our landfills take 2 decades in order to decompose. If they decompose, that they launch dangerous poisonous chemical compounds on the dirt.- Lower than 3% involving cheap bags usually are recyclable. A large number of plastic material bags end up in rubbish dumps and seas seeing that kitten.- Four billion dollars cheap bags develop into litter box annually.- Us residents work with 75 million plastic-type material bags every year. Using a world wide range, Five hundred million to one million plastic material bags are employed.- 75% regarding deceased sea turtles as well as other injury to animals come from plastic material particles inside our ocean- 12 zillion casks connected with fat must develop cheap bags utilised in america annuallyEnvironment pleasant bags compared to. Plastic material bagsUsing environment-friendly bags lessen the requirement of plastic bags. Should the requirement drops, does the making regarding damaging chemicals on the atmosphere manufactured by plastic bag companies. Factories which make plastic-type material bags make dangerous smog creating really serious hazard to individuals along with the surroundings. Some compounds are really strong that they destroy this ozone covering -- creating individuals susceptible to your sun's unsafe light and illnesses which go together with turning out to be also exposed to the idea. Air pollution is additionally developed by simply these recycling locations wanting to reduce cheap as well as newspaper bags, to ensure our landfills will have more space.Environment warm and friendly bags are wonderful choices to document bags. Papers bags are made of woods. When they're able to degrade naturally, trees have to be cut down to make these individuals. The greater paper bags are used in a grocery, the greater timber tend to be decrease. This creates deforestation wherever woods usually are obtained in addition to arrives continue to be unwelcoming. Deforestation is a major factor regarding climatic change to result in expensive deluges resulting to damage in folk's lifestyles and also components. Environment welcoming bags lower kitten. Plastic material bags are some of the major reasons for kitten equally about area along with drinking water. That they carry too much time to help decompose as well as pose severe danger to be able to wildlife.Using Environmentally friendly bagsThere a variety of benefits of using most of these "green" bags apart from improving the atmosphere. Green bags are usually long lasting. They're able to carry twice as much luggage than plastic and also newspaper bags. Papers in http://www.hermesbeltsbirkinkellybag.co.uk/ addition to plastic-type bags are very simple to help rip when baggage gets to be overweight.Green bags are produced from long, delicate material that you can easily go on the glenohumeral joint. It's possible to fold them in a sleek and stylish method and place these individuals as part of your bag-they would not undertake an excessive amount space.Environment warm and friendly bags are produced from eco-friendly, non-toxic and non-allergen textiles similar to natural pure cotton. They may be recyclable and washable and may even go on for several years.They also are obtainable in quite a few models, styles and colors to complement every single spirits and want. These types of green bags have come to be rather modern. Well-known designers including Stella McCartney, Giorgio Armani and also Heidi Klum usually are joining your train as well as planning environment friendly bags that happen to be both trendy in addition to wonderful.

Comment by stephanieg915 1 day ago

Your point of view

You must be signed in to comment.