I’m a complete moron, I should’ve had that backed up and used trash…
I had to learn the hard way lol
I should’ve […] used trash
For those who don’t know: trash-cli
Sorry for your loss. I did something similar recently. A script was creating a “~” folder in my notes folder. I wanted to delete it… Thankfully it stopped at some file it couldn’t remove and my dotfiles are in git.
if your session is still running you can use
env
to help reconstruct itI should’ve had that backed up
Absolutely! IT’s time to check out Stow now. With this you can easily manage your configuration and dotfiles (and all other data) in a single location.
https://venthur.de/2021-12-19-managing-dotfiles-with-stow.html
thats the sort of command you need to make an alias for
i have
rm
aliased torm -i
, it’s basically the closest to PowerShell’s-WhatIf
that a posix shell getsCan you say why were you trying to rm -r your .cache anyway? Also RIP.
Save space probably
Yeah my system was running out of space and I wanted to free a bit quickly. Turns out the issue was Rust building 20GB of binaries and I should have deleted those instead.
Ow.
Use nix home-manager or guix home and put your configs in a git repo (this is my guix home config for reference)
That’s very helpful now. You have added nothing other than to pull the declarative distro equivalent of “I use Arch, BTW” And then link your literal code. For shame. For shame.
nix/guix can be used on any distro and it provides a way to organize .config files so that if the .config directory gets deleted or accidentally modified for some reason, restoring it would be very easy. By putting the configuration in a git repo, it also makes it easy to restore previous configurations. I accidentally deleted a bunch of stuff in my .config directory once and that’s one of the reason I use this tooling now, so I thought OP would find it helpful also