4 ms·
I'm building a general-purpose undo that will log and let you undo things like chmods, chown/chgrps, mv's and rm's. it will work with the recursive parameters o
by pmarreck 2y ago
I'm building a general-purpose undo that will log and let you undo things like chmods, chown/chgrps, mv's and rm's. it will work with the recursive parameters of those utilities and shunt that out to `find` with `-exec` so it can track the undo of every individual file. it will use the xdg-trash spec for rm'ing files. I haven't pushed it up to github yet but I have test cases working locally. in particular it will handle idempotent updates properly so if you for example chown a file with the same user and group, it will be recorded as a no-op so that a later (untracked) change won't get overwritten when you undo a tracked change that would otherwise interfere with it.
it's just plain old bash, so nothing fancy like Rust, but it should work