rm -r FOLDER deletes a folder and everything under it, records and objects, so the space is freed. It lists what will go (the first 20 names, then a count) with the total size and asks on the terminal; no answer or no terminal deletes nothing. -f skips the question and makes a missing name a no-op, -rf and -fr combine them, and rm -r / is refused. Objects still in use are worked out once per delete, not once per file. ls now shows one level, like ls(1): sub-folders once with a trailing slash, their total size and newest date, then the files, with names relative to the folder. list keeps the recursive listing of full names that scripts pipe through cut -c31-, and ls -r is the same. Docs, man pages, the guide (new rm-r screenshot) and README follow. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
91 lines
2.0 KiB
Groff
91 lines
2.0 KiB
Groff
.TH VAULT-RM 1 "October 2026" "vault" "User Commands"
|
|
.SH NAME
|
|
vault-rm \- delete stored files or folders
|
|
.SH SYNOPSIS
|
|
.B vault rm
|
|
.RB [ \-f ]
|
|
.RB [ \-\-key
|
|
.IR PATH ]
|
|
.RB [ \-\-vault
|
|
.IR DIR ]
|
|
.I NAME
|
|
.br
|
|
.B vault rm \-r
|
|
.RB [ \-f ]
|
|
.RB [ \-\-key
|
|
.IR PATH ]
|
|
.RB [ \-\-vault
|
|
.IR DIR ]
|
|
.I FOLDER
|
|
.br
|
|
.B vault delete
|
|
\&...
|
|
.SH DESCRIPTION
|
|
Deletes the stored file
|
|
.I NAME
|
|
from the vault: its catalogue record and every encrypted object holding
|
|
its contents, so the space is freed on disk straight away.
|
|
.PP
|
|
With
|
|
.BR \-r ,
|
|
deletes
|
|
.I FOLDER
|
|
and everything at or under it. Because there is no undo, it first lists
|
|
what it will delete (the first 20 names, then a count) with the total size,
|
|
and asks on the terminal. Anything but
|
|
.B y
|
|
or
|
|
.B yes
|
|
deletes nothing, and so does having no terminal to ask on. A trailing
|
|
.B /
|
|
on
|
|
.I FOLDER
|
|
is ignored, and
|
|
.B vault rm \-r /
|
|
is refused rather than emptying the vault.
|
|
.PP
|
|
Each deleted file is reported on standard error, and
|
|
.B \-r
|
|
ends with the number of files and their total size. The vault is locked
|
|
exclusively for the whole run. A key sees only its own files, so the
|
|
decoy passphrase never deletes real files, or the other way round.
|
|
.SH OPTIONS
|
|
.TP
|
|
.B \-r
|
|
Delete a folder and everything under it.
|
|
.TP
|
|
.B \-f
|
|
Do not ask before a recursive delete, and do not fail when there is
|
|
nothing to delete.
|
|
.TP
|
|
.BR \-rf ", " \-fr
|
|
Both of the above.
|
|
.TP
|
|
.BI \-\-key " PATH"
|
|
Key file. Default: $VAULT_KEY, else ~/.vault/key.
|
|
.TP
|
|
.BI \-\-vault " DIR"
|
|
Vault directory. Default: $VAULT_DIR, else ~/.vault/store.
|
|
.SH ENVIRONMENT
|
|
.TP
|
|
.B VAULT_PASSPHRASE
|
|
Passphrase, instead of prompting on the terminal.
|
|
.SH EXIT STATUS
|
|
0 if everything asked for was deleted, or there was nothing to delete with
|
|
.BR \-f .
|
|
1 if the name is not in the vault, the delete was declined, or anything
|
|
fails; files already deleted stay deleted.
|
|
.SH EXAMPLES
|
|
.RS
|
|
vault rm notes.md
|
|
.br
|
|
vault rm \-r old/2024 # asks first
|
|
.br
|
|
vault rm \-rf tmp # no questions
|
|
.RE
|
|
.SH SEE ALSO
|
|
.BR vault (1),
|
|
.BR vault\-list (1)
|
|
.SH AUTHOR
|
|
Andy Dixon <vault@dixon.cx>, https://www.dixon.cx
|