Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

8
  • 19
    this should be correct answer Commented Mar 3, 2016 at 10:55
  • 1
    agree with @MitchBroadhead. this solves the problem within bash itself, without external cron-job. tested it on ubuntu 17.04 and 16.04 LTS Commented Jul 29, 2017 at 8:10
  • 25
    This only ignores duplicate, consecutive commands. If you alternate repeatedly between two given commands, your bash history will fill up with duplicates Commented Dec 22, 2018 at 0:39
  • 5
    This answer contains useful information, but misleadingly claims to "do exactly what you wanted". The question states the "problem for me is that erasedups only erases sequential duplicates". This answer only explains how to use erasedups to erase sequential duplicates. It is not an answer to the actual question of how to erase all duplicates, not just sequential ones. Commented Oct 22, 2021 at 15:09
  • 2
    @JonathanHartley, it's not misleading anymore, thankfully, someone kindly edited it to "It does almost exactly what you wanted". Commented Oct 23, 2023 at 10:16