Crate bak9

source ·
Expand description

§bak9

Creates a backup .bak copy of FILE.

Usage: bak [OPTION]... FILE [DIR]

If DIR is not specified, the copy is created in the same directory as FILE.

If multiple backups of FILE exist, the filename extension used will be: .bak.N.

With multiple backups, the most recent backup will be always bak.0. Previous copies will have their filename extension shifted by 1 (e.g., bak.1 -> bak.2).

Pruning (deletion) occurs after -n NUM backups.

If the current backup is no different than its predecessor, copying will be skipped.

§Options

  • -d
    Deletes all backup files for the source FILE.

  • -n NUM
    Creates at most NUM backup files.
    If not specified, defaults to 10 (0-9).

Modules§

Enums§

Constants§

Functions§