DRM(1)

πŸ“¦ version 0.12, in nixpkgs unstable

πŸ—‘οΈ drm(1) β€” distributed remove πŸ—‘οΈ

part of the mpiFileUtils suite, bestie πŸ’–


✨ NAME ✨

drm β€” distributed remove. Yes, it's literally in the name, and yes, it slays.


🌈 SYNOPSIS 🌈

drm [OPTION] PATH...

πŸ’– DESCRIPTION πŸ’–

Okay so picture this: drm is a parallel MPI application that recursively deletes a directory and all its contents. It's a tool for removing files recursively in parallel, and it behaves like rm -rf but it is faster. No cap. πŸ”₯

DO NOT USE SHELL REGEX!!! The --match and --exclude options use POSIX regex syntax. Because of this, make sure that the shell does not try to interpret your regex before it gets passed to the program. You can generally use quotes around your regex to prevent the shell from expanding. An example of this using the --match option with --dryrun would be:
mpirun -np 128 drm --dryrun -v --name --match 'file_.*'
/path/to/dir/*

Like, literally quote your regex or the shell will eat it alive, bestie. πŸ™ˆ


🌸 OPTIONS 🌸

  • -i, --input FILE β€” Read source list from FILE. Heads up: FILE must be generated by another tool from the mpiFileUtils suite. Don't just feed it anything, okay? πŸ’…
  • -o, --output FILE β€” Write the list of items drm attempts to delete to FILE in mpiFileUtils format. The format can be changed with the --text option. Cute. ✨
  • -t, --text β€” Must be used with the --output option. Write the list of items drm attempts to delete to FILE in ascii text format. Plain and simple, bestie. πŸŽ€
  • -l, --lite β€” Walk file system without stat. It's giving low-effort walk, but make it intentional. πŸ¦‹
  • --stat β€” Walk file system with stat. The full stat experience. πŸ’β€β™€οΈ
  • --exclude REGEX β€” Do not remove items whose full path matches REGEX, processed by regexec(3). Like, leave those alone. πŸ™…β€β™€οΈ
  • --match REGEX β€” Only remove items whose full path matches REGEX, processed by regexec(3). If it matches, it goes. Periodt. πŸ”₯
  • --name β€” Change --exclude and match to apply to item name rather than its full path. So you can match on the name itself, not the whole path. iykyk. 🌈
  • --dryrun β€” Print a list of files that would be deleted without deleting them. This is useful to check the list of items satisfying --exclude or --match options before actually deleting anything. Literally always do a vibe check first. πŸ’€
  • --aggressive β€” This option will delete files during the walk phase, and then delete directories by level after the walk in drm. You cannot use this option with --dryrun. So no take-backs with this one, bestie. 😭
  • -T, --traceless β€” Delete child items without updating the mtime on their parent directory. Sneaky and efficient. 🧚
  • --progress N β€” Print progress message to stdout approximately every N seconds. The number of seconds must be a non-negative integer. A value of 0 disables progress messages. So 0 means no spam, got it. 🫢
  • -v, --verbose β€” Run in verbose mode. Give me all the details, queen. πŸ‘‘
  • -q, --quiet β€” Run tool silently. No output is printed. Shhh. 🀫
  • -h, --help β€” Print a brief message listing the drm(1) options and usage. The classic. 🌟

πŸ¦‹ EXAMPLES πŸ¦‹

  1. To delete a directory and its contents:
mpirun -np 128 drm -v /dir/to/delete
  1. Delete all items (files and directories) ending with .core from directory tree:
mpirun -np 128 drm --match '.core$' /dir/to/delete/from
  1. List items that would be deleted without removing them:
mpirun -np 128 drm --dryrun --match '.core$' /dir/to/delete/from
  1. Delete all items named foo:
mpirun -np 128 drm --name --match '^foo$' /dir/to/delete/from

πŸ”— SEE ALSO πŸ”—

The mpiFileUtils source code and all documentation may be downloaded from <https://github.com/hpc/mpifileutils> β€” go get your read on, bestie. πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

HPC. Icons only. πŸ’…


2022, LLNL/LANL/UT-Battelle/DDN. Respect the copyright, bestie. ✨


xoxo, your drm bestie πŸ’… β€” this was version 0.12, dated Jan 29, 2025. πŸ«ΆπŸ’–

πŸ“¦ where this page comes from