Skip to content

How to delete duplicate entries? #1311

Answered by wren
Serif-7 asked this question in Q&A
Jul 7, 2021 · 3 comments · 3 replies
Discussion options

You must be logged in to vote

Although we don't have an explicit command to find dupes (maybe we should?), you can use jrnl's import command for this.

  1. Move your journal file (let's say jrnl.txt) to something else (like jrnl-backup.txt or anything you want)
  2. Import the backup into the (now empty) journal: cat jrnl-backup.txt | jrnl --import
  3. jrnl will recreate jrnl.txt and dedupe the entries as they're being imported

Afterward, you can diff jrnl.txt and jrnl-backup.txt to be sure you got what you expected.

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@griffrawk
Comment options

@wren
Comment options

@griffrawk
Comment options

Answer selected by wren
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
support End user support
3 participants
Converted from issue

This discussion was converted from issue #1294 on July 31, 2021 19:15.