hpc / mpifileutils

File utilities designed for scalability and performance.
https://hpc.github.io/mpifileutils
BSD 3-Clause "New" or "Revised" License
170 stars 68 forks source link

drm: behavior relative to "rm -rf" #580

Open nDimensionalSpace opened 3 months ago

nDimensionalSpace commented 3 months ago

I will note that the docs for drm say "behaves like rm -rf", but that doesn't seem quite correct . . . For plain old rm, the docs say the following:

"-f: Ignore nonexistent files and arguments, never prompt"

However, I am seeing that drm errors out on nonexistent arguments, i.e., if I type:

drm file1 file2,

and file1 doesn't exist, then file2 is not removed, which is . . . painful. Is this intentional, or ??? Thx

daltonbohning commented 3 months ago

Looks like the walk returns on the first error https://github.com/hpc/mpifileutils/blob/0a4c530bca5dc2476418a3833a15ab812d636e78/src/common/mfu_flist_walk.c#L432-L437 Not immediately sure the best way to handle this since I think several utilities share this function