Timeline for How can I remove duplicates in my .bash_history, preserving order?
Current License: CC BY-SA 4.0
17 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Feb 2 at 7:30 | comment | added | Daniel Kaplan | @MitchBroadhead This should not be marked as the correct answer. It doesn't do what the OP asked. Any duplicates that already exist in your .bash_history file will remain. | |
| S Jun 12, 2024 at 10:54 | history | edited | Stephen Kitt | CC BY-SA 4.0 | Clarify how it fails to answer the question (without an “EDITOR’S NOTE”). |
| Jun 11, 2024 at 13:32 | review | Suggested edits | |||
| S Jun 12, 2024 at 10:54 | |||||
| Oct 23, 2023 at 10:16 | comment | added | sprite | @JonathanHartley, it's not misleading anymore, thankfully, someone kindly edited it to "It does almost exactly what you wanted". | |
| S Nov 11, 2022 at 11:14 | history | suggested | oheikk | CC BY-SA 4.0 | add caveat about shopt -s histappend |
| Oct 19, 2022 at 19:33 | review | Suggested edits | |||
| S Nov 11, 2022 at 11:14 | |||||
| Oct 22, 2021 at 15:09 | comment | added | Jonathan Hartley | 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. | |
| S Apr 26, 2020 at 12:06 | history | edited | fpmurphy | CC BY-SA 4.0 | added 16 characters in body |
| Apr 26, 2020 at 6:25 | review | Suggested edits | |||
| S Apr 26, 2020 at 12:06 | |||||
| Dec 22, 2018 at 0:39 | comment | added | Dylanthepiguy | This only ignores duplicate, consecutive commands. If you alternate repeatedly between two given commands, your bash history will fill up with duplicates | |
| Jan 19, 2018 at 14:09 | comment | added | WeakPointer | works on OpenBSD too. It only removes dups of any command it is appending to the history file, which is fine for me. It has the interesting effect of shortening the history file as I enter commands that had existed as duplicates before. Now I can make my history file max shorter. | |
| Jul 29, 2017 at 8:10 | comment | added | Georg Jung | agree with @MitchBroadhead. this solves the problem within bash itself, without external cron-job. tested it on ubuntu 17.04 and 16.04 LTS | |
| Apr 13, 2017 at 12:22 | history | edited | CommunityBot | replaced http://askubuntu.com/ with https://askubuntu.com/ | |
| Dec 1, 2016 at 1:12 | comment | added | Ricardo | tested on Max OS X Yosemite and on Ubuntu 14_04 | |
| Mar 3, 2016 at 10:55 | comment | added | MitchBroadhead | this should be correct answer | |
| Feb 25, 2016 at 7:06 | review | First posts | |||
| Feb 25, 2016 at 7:22 | |||||
| Feb 25, 2016 at 7:02 | history | answered | sprite | CC BY-SA 3.0 |