Though I'm moreso tempted to just create a `.1111aaaa-antidumb` directory and store my caches and backups there.
This has also un-inspired me from creating a fast `rm`-esque utility.
Only if the file is too big to fit into the garbage bin, I can unalias rm, rm the thing and then reset the alias immediately after.
In Bash I believe instead of `ls` you can `\ls` to get the unaliased version.
Good idea, for safety of course. Just for completeness sake I would add one should not rely on that especially if they are using XFS and especially if using a hardware raid controller. The recursive rm may complete faster than the inodes are removed due to the nature how XFS among a few other filesystems operate in the background. I doubt many are using hardware raid controllers on their workstations but if one is on a server there is a chance there may be one and those will also perform some transactions in the background and one may get their prompt back sooner than the inodes have actually been removed. This is all edge case off course. People should have a massive .pr0n folder regardless.
I can’t grasp how “power users” like Linux users are stuck working in primitive environments.
Just use btrfs, and set up btrbk to snapshot your home directory every 5 minutes, and have its gc keep every snapshot from past few hours, an hourly snapshot for past few days, and weekly for past few months.
The problem with snapshots is that they take up space. The trash has the same issue, with the added drawback that you have to think about emptying it, and if you empty it before realizing you made a mistake, it won't help you.
With a "garbage heap" model, all deleted files would automatically end up on the "heap" when deleted. The heap would be exactly as large as the amount of free space you have left, and shrink when necessary by deleting the oldest files, perhaps with a minimum size (expressed in days) that would require manual action to shrink beyond.
Btrbk can also take disk space into account for garbage collecting snapshots? Not sure.
- ~/.local/share/docker is 29G of data that continuously mutates. - Rust/Cargo produce "target" directories in $PWD whenever they run, which is gigabytes of crap littered all over the place.
Keeping snapshots of home would take up a huge amount of disk space, especially if you ever want to keep more than one.
That said, keeping TWO snapshots for 24hs for "un-deleting" files might be an interesting idea.
Stuff like .cache and podman stuff stays unsnapshotted.
I just recommend to others to snapshot home since most people don't want to bother categorizing their data.
And if you rm/del/Remove-Item on Windows, it will also delete without sending to the recycle bin.
When I delete something I want it deleted. If I make a mistake I grab it from a backup or just re-obtain it.