DIGUP(1)

πŸ’– digup β€” like, the manual page bestie πŸ’–

okay so you found digup, the digest file updating program, section 1 of the General Commands Manual πŸŽ€ pull up a chair, grab a boba, we're doing this πŸ’…


✨ NAME ✨

digup β€” digest file updating program. that's it. that's the name. iconic behavior honestly πŸ‘‘


🌸 SYNOPSIS 🌸

digup [OPTIONS]

πŸ¦‹ DESCRIPTION πŸ¦‹

okay so bestie, digup is a tool that updates md5sum or shasum digest files. it reads your existing digest files, checks the current directory for new / updated / modified / renamed / deleted files, and then queries you with a summary of the changes. you review the updates, and then they can be written back to the digest file. the way that it just… handles it for you 😌✨

one of the envisioned applications of digup is to update and verify incremental archives, like chronological data storages or music collections 🎡 by using digup, possibly undesired changes or lost files can easily be detected while quickly adding new files. like, it's giving archive guardian energy fr fr 🫢

another purpose could be to automatically verify the integrity of hard disk copies of archives, because backups to hard disks are becoming increasingly popular (everyone's got a disk somewhere ngl). using a full file digest scan, even slowly creeping bad blocks on old hard disks can be detected πŸ’€ by using a crontab entry, this check can be performed unattended and routinely. she works while you sleep, periodt πŸ˜΄πŸ‘‘

in normal operation, only touched files with newer modification times are fully read and their digest compared. optionally, a full scan can be performed to test all file contents against their expected digests πŸ”

symbolic links are supported, either by following the link and reading the target's digest, or by saving only the link target path and verifying it against the old one 🧚

the digest files written by digup are compatible with those generated and read by md5sum and similar programs from the coreutils package. additional info like file size and modification time, or symlink targets, are stored on comment lines πŸ“

four digest algorithms are supported: MD5, SHA1, SHA256 and SHA512 πŸ’« the digest file itself is also checksummed using CRC32 against unintentional changes. and a fast red-black binary tree is used for the internal file list, allowing fast operation on a large number of files. red-black tree?? she's a data structures girlie AND a digest girlie 🌈⭐


πŸ’… OPTIONS πŸ’…

  • -b, --batch β€” turns on non-interactive batch processing mode, which is what you need when you're running unattended, e.g. from cron. this option also decreases verbosity by one level (--quiet). the returned error code is set to 1 if any changed, renamed, moved, deleted files or read errors occur 🚨
  • -c, --check β€” performs a full digest scan of all file contents, thus ignoring file modification times. without this option, files with equal size and modification time are skipped. she's thorough, she's reading EVERYTHING 😀
  • -d, --directory=<path> β€” change into this directory before looking for digest files or performing a recursive scan. basically "start here bestie" πŸ“
  • --exclude-marker=<file> β€” sets a marker file, often called ".nobackup" in other programs. if this marker file is found in a directory, the directory itself and all sub-directories are excluded from the digest scan 🚫

this option is persistent. it is saved in the digest file and will be applied to all future scans performed to check or update digests. so it's not a one-time thing, it lives there now, it pays rent 🏠

  • -f, --file=<file> β€” check this file for existing digests and write updates to it. depending on the selected digest --type, the following file names are used by default: "md5sum.txt", "sha1sum.txt", "sha256sum.txt" or "sha512sum.txt" πŸ“„
  • -l, --links β€” when this flag is enabled, symbolic links (if supported on the platform) are followed. otherwise, by default, only the symbolic link's target path is saved and verified πŸ”—
  • -m, --modified β€” print only modified, changed, copied, renamed or deleted files. unchanged file lines are suppressed. if the whole digest file is clean, then no summary output is printed at all. this option is useful for crontabs in combination with --batch 🀫
  • --modify-window=<integer> β€” consider modification time deltas of up to this value to be unchanged (the default is zero). this option is very useful for checking backups on FAT filesystems, as FAT stores modification times with a precision of only 2 seconds. yeah. two whole seconds. the disrespect 🫠
  • -q, --quiet β€” reduces the level of verbosity by one. shhh 🀫
  • -r, --restrict=<substring> β€” restricts the digest check to filepaths containing the given substring pattern, other files are skipped. does NOT imply -c / --check; specify it additionally to run a full digest check of specific files ⚠️ like, don't assume, specify, okay?
  • -t, --type=<digest-type> β€” select the digest type for newly created digest files. this is not needed for updating an existing one, as the type can be inferred from the digest length πŸ”Ž

digest-type must be md5, sha1, sha256 or sha512. the default digest type is sha1 ⭐

  • -u, --update β€” automatically update the digest file in batch mode. requires --batch, which is not automatically activated by this option. so you gotta say it yourself, bestie, she won't read your mind πŸ™ˆ
  • -v, --verbose β€” increase the level of verbosity by one.

at level 0 only read errors are printed.

at level 1 the status of each processed file is printed.

and at level 2 (the default) additionally a progress indicator is printed while reading each file (one dot per megabyte) 🫧

  • -V, --version β€” print digup version and exit. bye bestie πŸ‘‹
  • -w, --windows β€” ignores modification time deltas of just 1 second (equivalent to --modify-window=1). useful for checking backups on FAT filesystems πŸͺŸ

🌈 EXAMPLES 🌈

to update or create a SHA1 digest file in the current directory, just run plain:

digup

alternatively, update or create a SHA512 digest file in /mnt/disk1:

digup -t sha512 -d /mnt/disk1/archive

a common call for a crontab line is:

digup -bmd /mnt/disk1/archive

to run a full scan every midnight, add a line similar to the following to your crontab:

0 * * * *       digup -bcmd /mnt/disk1/archive

🫢 AUTHORS 🫢

Timo Bingmann (tb (at) panthema <dot> net) β€” thank you for this gift, king πŸ‘‘


πŸ‘€ SEE ALSO πŸ‘€

md5sum(1), sha1sum(1), sha256sum(1), sha512sum(1)


and that's the whole page bestie πŸ’– this was DIGUP(1), dated 2009-11-10, and she's been serving digest realness ever since. go forth and verify your archives, no cap πŸŒΈβœ¨πŸŽ€πŸ¦‹