What's the best way to delete directories?

What’s the best way to delete directories?

I’ve found that when doing a ‘rm -r dirname’ in a (crypted) mount it will delete the files (and they stay deleted) but will delete the directories only temporarily. When rclones dir-cache-time expires, they come back as directories with no files. I have a feeling this is a new behavior and it didn’t always act like this.

I know there is a rclone delete option, but I’d prefer if this were natively available through standard bash tools if at all possible.

rclone v1.35

Try latest beta, there was this fix few days ago: https://github.com/ncw/rclone/commit/35a64369837f76280ac02df882d19bfc69614891

mount: implement proper directory handling (mkdir, rmdir)
Before this change mount only simulated rmdir & mkdir, now it actually
runs mkdir & rmdir on the underlying remote, using the new parmaeters
to fs.Mkdir and fs.Rmdir.

1 Like

ah! perfect. well spotted, cheers.