Skip to content

extract

Writes a stored file back to disk, byte for byte.

Terminal window
sefy extract <REFERENCE> [OPTIONS]
Option Meaning
-o, --output <PATH> Where to write it; defaults to the stored file name in the current directory.
--force Overwrite the destination if it exists.
Terminal window
$ sefy extract id_ed25519 -o ~/.ssh/id_ed25519
wrote /home/you/.ssh/id_ed25519 (387 bytes)

An existing file is never overwritten silently:

Terminal window
$ sefy extract id_ed25519 -o ~/.ssh/id_ed25519
error: ./id_ed25519 already exists; pass --force to overwrite

The bytes come back identical. Permissions, ownership and timestamps do not — they were never stored. For anything that cares about its mode, set it after extracting:

Terminal window
sefy extract id_ed25519 -o ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519

Once extracted, the file is a plain file on disk like any other; the vault protects what is inside it, not the copy you just wrote out.