Remove multiple entries of the same command in .bash_history with preserving the chronological order

cp -a ~/.bash_history ~/.bash_history.bak && perl -ne 'print unless $seen{$_}++' ~/.bash_history.bak >~/.bash_history
Only the first appearance of a repeated command in the history will be kept. Otherwise, if you prefer to keep last occurrence of a repeated command then maybe you can achieve that by including reverse input/output i.e with 'tac' command in expression above. To see statistics of removed repeated commands: diff --suppress-common-lines -y ~/.bash_history.bak ~/.bash_history|uniq -c|sort -n|tr -s " "|sed '/^ 1/d'|grep '<'

0
By: knoppix5
2019-04-15 12:39:09

What Others Think

Very organized https://eyelashextensionssanantonio.com
geebranz · 53 weeks and 3 days ago
Good day! This post could not be written any better! Reading this post reminds me of my previous room mate! He always kept chatting about this. I will forward this page to him. Pretty sure he will have a good read. Thanks for sharing! ???????? ????
nakav51247 · 17 weeks ago
where to get shrooms dried mushrooms african pyramid mushroom african transkei mushroom albino penis envy b+ mushrooms blue meanies mushroom brazilian magic mushroom burmese mushroom golden teacher mushroom ko samui super strain malabar coast martinique mexican mushroom mushroom british columbia super thai mushroom nepalese chitwan mushroom penis envy texas penis envy 6 texas yellow caps vietnamese white jedi mind fuck tri coloured ecuadorian mushroom magic mushsroom edibles mexican cubensis psychedelic chocolate bar where to get shrooms dried mushrooms african pyramid mushroom african transkei mushroom albino penis envy b+ mushrooms blue meanies mushroom brazilian magic mushroom burmese mushroom golden teacher mushroom ko samui super strain malabar coast martinique mexican mushroom mushroom british columbia super thai mushroom nepalese chitwan mushroom penis envy texas penis envy 6 texas yellow caps vietnamese white jedi mind fuck tri coloured ecuadorian mushroom magic mushsroom edibles mexican cubensis psychedelic chocolate bar midnight mint psychedelic chocolate bar origin mango psilo gummies 0.25g-1g origin strawberry psilo gummies 0.25g-1g penis envy psychedelic chocolate bar psilocybin cube gummies vegan dark chocolate psychedelic chocolate bar microdoses brain capsules 50mg-200mg chill capsules 50mg-200mg clarity capsules 50mg-200mg health capsules 50mg-200mg love capsules 50mg-200mg mood capsules 50mg-200mg pure capsules 50mg-200mg social capsules 30 pack 350mg social capsules 5 pack 350mg
johnson20007 · 16 weeks and 2 days ago
Discover nokia mobile repair in UAE. Authorized Nokia Mobile Repair Center | 20+ Year of Trust Get the best Nokia mobile repair service in your doorstep or our axiom care Book your Nokia mobile repair now at affordable price at Axiom care. nokia mobile repair
KayGasaway · 15 weeks and 6 days ago
Buy delta belts ?8 THC Infused Rainbow Candy Belts 20mg, 25mg, 40mg These tasty Delta 8 THC Candies are infused with quality distillate Order Now!
wenilak444 · 15 weeks and 2 days ago
School jobs in Spokane There are 7 School jobs in Spokane advertised on WhatJobs in February 2022. Apply online today and set up job alerts to get the latest jobs by email direct to your inbox.
goxah55535 · 15 weeks and 1 day ago
Turcja Visa Online I do know this isn’t precisely on subject, however i’ve a site using the identical program as properly and i get troubles with my feedback displaying. is there a setting i am missing? it’s doable chances are you’ll assist me out? thanx.
goxah55535 · 15 weeks ago
Explore Revexpo, A Indian review website, Their article will help you to pick the right Best fogg scent in india along with a proper buying guide. Fogg comes in a wide and unique range of fragrances for both men and women. Fogg is quite a revolutionary product in the deodorant market as it is liquid-based in nature. Article
KayGasaway · 14 weeks and 5 days ago
This is very educational content and written well for a change. It's nice to see that some people still understand how to write a quality post! cheap valorant boost
wenilak444 · 13 weeks and 6 days ago
Cranio-Sacral Therapy is an exceptionally gentle yet extremely powerful and profound, pain and drug-free way of hands-on healing method at Nawellness. cranial sacral therapy Vancouver
wenilak444 · 13 weeks and 6 days ago
Our Custom Shoes kicks (KOTD) sell remarkable sneakers with hand painted design (no sticker) workmanship and craftsmanship. Made to order ... custom painted timberland boots
wenilak444 · 13 weeks and 6 days ago
Visit Kyle Seyboth's profile on Zillow to find ratings and reviews. Find great Seekonk, MA real estate professionals on Zillow like Kyle Seyboth of Century ... Mike Asimos
nakav51247 · 13 weeks and 6 days ago
hmmm, mobile marketing is quite interesting, maybe there would be some more money making oppurtunities in it’ ? ?????? ???? ????????
goxah55535 · 13 weeks and 6 days ago
Explore about voice over services - Gotham Lab - Translation Voiceover Subtitling, An industry leader in media localization services and language solutions Translation services,voice over services, subtitling captioning. Market research shows that Gotham Lab is 20% – 30% lower in cost than ANY localization service competitor.Please visit our website for more info. voice over services
KayGasaway · 12 weeks and 4 days ago
cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber cfiber fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers fox fiber construfiber fiboverview overview overview steel overview buy polysterfibers cfiber fox fiber construfiber fiboverview overview overview
steelfiber · 12 weeks and 1 day ago
I have been surfing online greater than three hours these days, but I never discovered any attention-grabbing article like yours. It’s lovely value enough for me. Personally, if all webmasters and bloggers made just right content as you probably did, the internet can be much more helpful than ever before. ?????????? ????? ??? ??? ??????
gexeji53 · 11 weeks and 6 days ago
At Allegra & Co., we offer a beautiful selection of high quality Affordable cheap engagement rings for women at prices that won't break the bank. All our rings are backed with a Warranty and a 100% satisfaction guarantee. Browse our selection of products to find exactly what you need. Please visit our by clicking here get discounts & special deals. Thank You. We exist to provide you the highest quality engagement and without breaking the bank. Because we believe that a wedding does not have to cost you a fortune. tungsten carbide wedding rings
wenilak444 · 11 weeks and 4 days ago
Incoming takeaway service Recommendation & Promotion ?Exclusive free shipping offer ?Get Your food at meeting or 2-100 people set meal ?Pre-ordered party food delivered on the same day?Kamadelivery.com, They also accept large-scale hong kong catering for large and small birthday parties, banquets, company events, friend gatherings or children's birthday parties, Kama is one of the leading catering service in Hong Kong. hong kong catering
goxah55535 · 10 weeks and 6 days ago
Andrew Ludlam – The Business Plan Writer & business plan consultant in UK, For over a decade I've been helping business owners to plan and grow. I'm a qualified business adviser, consultant and trainer, having worked with many hundreds of business owners from start-ups through to large corporations. Click here & get 10 Years experienced business Advice by directly contacting me.
yarosel701 · 10 weeks and 4 days ago
Ocala.Church offers the most dynamic and spirit filled worship, preaching and teaching available in Marion County, Florida with age specific sessions and content for all age groups. Explore churches in ocala fl as each service here you’ll find a vibrant multicultural atmosphere with exciting, contemporary worship music and a powerful message that will speak to you where you are at. On Sunday mornings, children are well-cared for in fun-filled Sunday School classrooms.
KayGasaway · 10 weeks and 2 days ago
I found so many interesting stuff in your blog especially its discussion. From the tons of comments on your articles, I guess I am not the only one having all the enjoyment here! keep up the good work... Joker Gaming
JaydenShaw · 10 weeks and 2 days ago
Bring back your favorite childhood games with our Gameboy iPhone cases!! 36 retro classic games with a color display screen Free Shipping! gameboy iphone case
gexeji53 · 10 weeks and 1 day ago
Discover how To fix mascara running down face - Having makeup has become our best thing in current times. Wit Makeup bring issues like mascara running down face. We have applied Mascara on our eyelashes as a starting makeup routine, and we may still do. Mascara works to improve our eyelashes’ look to make them darker, fuller, or extended. Of course, the look that your eyelashes get depends on what you need. If you succeed in finding the perfect mascara type and excellent tips to maintain your eyelashes after Mascara, then you will always appear beautiful.
gexeji53 · 10 weeks and 1 day ago
Get easy permit services for new construction and building renovations, We have previously worked with city officials and other departmental employees on other permit applications. This gives us an advantage when it comes to getting information, solving problems, understanding fee structures, and negotiating when necessary. Please click here to visit our website and get more info, Thank You
gexeji53 · 9 weeks and 5 days ago
If You are looking to remove black magic forever. Instantly! Using A Unique Method, remove black magic instantly efficiently Voodoo, spells, curses, programs, entities, spirits, buildings etc, Visit this website and get Free heading video, or get in touch for more details. You will get Free emergency (First Aid) Magic Cleaning Video on the webiste. Thank You.
goxah55535 · 9 weeks and 2 days ago
The Easy Permit Application Chicago process will require the owner and the general contract to complete information in regard to the projects. On the application, you will find five general sections. Some of the information can be provided by the owner while the contractor should complete some other information.
nakav51247 · 9 weeks and 1 day ago
Explore about certified translation services - Gotham Lab - Translation Voiceover Subtitling, An industry leader in media localization services and language solutions Translation services, voice over services, subtitling captioning. Market research shows that Gotham Lab is 20% – 30% lower in cost than ANY localization service competitor. Please visit our website for more details.
yarosel701 · 8 weeks and 6 days ago
Discover NFT's. Ethereum - NFTs give the ability to assign or claim ownership of any unique piece of digital data, trackable by using Ethereum's blockchain as a public ledger.
gexeji53 · 8 weeks and 5 days ago
IT LABS PRO est la meilleure société de services d'ingénierie informatique au Maroc, en vous déplaçant à son siège à Marrakech - gueliz vous allez bénéficier des meilleurs services de création de sites et applications de gestion web, cette dernière privilégie ses clients et mettez à leur disposition toutes ses ressources pour l'accomplissement de leurs projets tout en offrant son expertise en conseillant ses clients et les accompagnant pour améliorer leurs images sur intérêt et mieux gérer leurs business. Creation site web maroc
itlabspro · 8 weeks and 4 days ago
Discover water storage tank - Are you looking for mobile welders near me? We offer steel, aluminum, stainless steel welding services across UK. Your search for local mobile welders is over. Weld-delux LTD is a leading provider of metal fabrication and mobile welding services. The term METAL FABRICATORS rather than STEEL FABRICATORS used deliberately as we work with various metals.
goxah55535 · 8 weeks and 4 days ago
Discover manga series books - Now is the best time to start a collection of your favorite anime character series merch. Searching for some inspiration on a budget? Acrylic anime standees are what's trending and one of the easiest ways to start collecting.
nakav51247 · 8 weeks ago
Celéri Health uses real-world patient centric data to improve care and quality of life for people living with pain. Please click here and visit our website for more details. Thank You
gexeji53 · 7 weeks and 5 days ago
Vegan-friendly - our label is made of 100% vegan leather. No animals were harmed in the making of Dormi sleep headphones headband. http://ayesha.inube.com/blog/8861423/dormi-wireless-bluetooth-headband-headphones-for-sleeping-dream/">sleep headphones headband
lahehan967 · 7 weeks ago
Vegan-friendly - our label is made of 100% vegan leather. No animals were harmed in the making of Dormi sleep headphones headband. sleep headphones headband
lahehan967 · 7 weeks ago
Find scrubs near me- ScrubHaven is a family-owned medical uniform shop serving medical professionals such as yourselves since 2005. Our mission is to fashionably dress those who serve others while providing high quality customer service that continues to bring you back here, to our store
nakav51247 · 6 weeks and 6 days ago
Looking to increase your monthly leads Look no further! Click here to learn more about our Hamilton SEO services and solutions
yarosel701 · 6 weeks and 1 day ago
There is no cost or obligation for this valuable service. For a Free home evaluation , please fill in the information requested. The more information you provide, the more accurate the evaluation.
yarosel701 · 6 weeks and 1 day ago
Carry the energy of powerful crystals anywhere you go with healing crystal bracelets made from genuine gemstones. It’s to ward off harmful energy when in our home since that’s where we keep our gemstones crystal bracelets
gexeji53 · 6 weeks ago
Big Lot is an American store that offers different types of things with a great deal to satisfy the customer’s needs and requirements. But this is not enough to grow the business and make customer’s satisfaction better and better, Therefore they have started Big Lots Survey on www.biglotssurvey.com official website
yarosel701 · 5 weeks and 6 days ago
The smok rpm 4 Kit comes equipped with 2 coils and a 2ml pod meaning you are all set to go for over a week without buying extras.
goxah55535 · 5 weeks and 4 days ago
Discover solar powered fan for car - We have everything you need to accessorize your car. From seat covers and floor mats to steering wheel covers and sunshades, we have it all. And we're adding new products all the time, so be sure to check back often. Our selection of car accessories has everything you need to protect your vehicle from everyday wear and tear, and we have everything you need to keep your car in great condition. We know you love your car, and we want to help you make it even better.
nakav51247 · 5 weeks and 3 days ago

What do you think?

Any thoughts on this command? Does it work on your machine? Can you do the same thing with only 14 characters?

You must be signed in to comment.

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



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: