Skip to content

Deleting DSU entries

Gene M. Angelo, Jr edited this page Jan 5, 2024 · 5 revisions

You can delete DSU entry groups; this will delete all the entries for the particular day or date range. When deleting DSU entries for a particular day (date, today, tomorrow, yesterday), or date range (dates), dsu will delete the entry group(s) and all the associated entries for that day or date range:

  • $ dsu delete today
  • $ dsu d n # Equivalent to the above, only using shortcuts
  • $ dsu delete tomorrow
  • $ dsu d t # Equivalent to the above, only using shortcuts
  • $ dsu delete yesterday
  • $ dsu d y # Equivalent to the above, only using shortcuts
  • $ dsu delete date DATE|MNEMONIC
  • $ dsu d d DATE|MNEMONIC # Equivalent to the above, only using shortcuts
  • $ dsu delete dates OPTIONS
  • $ dsu d dd OPTIONS # Equivalent to the above, only using shortcuts

NOTE: Before any of the above dsu commands are executed, dsu will prompt you to confirm the delete; you can continue ('y') or cancel ('N').

See the Dates section for more information on acceptable DATE formats used by dsu. See the Mnemonics section for more information on acceptable MNEMONIC rules and formats used by dsu.

IMPORTANT: In some cases the behavior that relative date mnemonics (RDMs, see the Mnemonics section for more information about RDMs) have on some commands are context dependent; in such cases the behavior will be noted in the help appropriate to the command, for example see the following dsu command help: dsu delete help date and dsu delete help dates.

Examples

The following example deletes the entry group and all entries for today's date.

$ dsu delete today

$ dsu d n

#=>
Are you sure you want to delete all the entries for 2023-12-17 (1 entry groups)? [y/N]> y
Deleted 1 entry group(s).

The following example deletes the entry group and all entries for yesterday's date.

$ dsu delete yesterday

$ dsu d y

#=>
Are you sure you want to delete all the entries for 2023-12-16 (1 entry groups)? [y/N]> y
Deleted 1 entry group(s).

The following example deletes the entry group and all entries for tomorrow's date.

$ dsu delete tomorrow

$ dsu d t

#=>
Are you sure you want to delete all the entries for 2023-12-18 (1 entry groups)? [y/N]> y
Deleted 1 entry group(s).

The following deletes the entry group and all entries for 12/17 of the current year.

$ dsu delete date 12/17

$ dsu d d 12/17

#=>
Are you sure you want to delete all the entries for 2023-12-17 (0 entry groups)? [y/N]> y
Deleted 1 entry group(s)

The following deletes the entry group and all entries for the past week, starting from today (12/17/2023).

$ dsu delete dates --from today --to -6

$ dsu d dd -f n -t -6

#=>
Are you sure you want to delete all the entries for 2023-12-11 thru 2023-12-17 (7 entry groups)? [y/N]> y
Deleted 7 entry group(s).