• 0 Posts
  • 125 Comments
Joined 1 year ago
cake
Cake day: June 19th, 2023

help-circle



  • If you’re scared to do rm -rf, do something else that lets you inspect the entire batch of deletions first. Such as:

    find .git ! -type d -print0 | xargs -0 -n1 echo rm -fv

    This will print out all the rm -fv commands that would be run. It’s basically rm -rf --dry-run, but rm doesn’t have that common option. Once you’ve verified that that’s what you want to do, run it again without echo to do the actual deletion. If you’re scared of having that in your history, either use a full path for .git, or prepend a space to the non-echo version of the command to make it avoid showing up in your shell history (assuming you have ignorespace in your HISTCONTROL env var)

    I use this xargs echo pattern a lot when I’m crafting commands that are potentially destructive or change lots of things.















  • All things I’m not interested in that tend to fall into these categories:

    • hyperlocal geographies
    • sports
    • specific games
    • specific hobbies
    • programming languages and other technologies
    • porn
    • meme groups about subcultures I’m not a part of
    • shitposting
    • subs where it seems everything is cross posted to another sub
    • pretty much all music subs (i’m not here for music)
    • pretty much all video subs (i’m not here for videos)

    Edit: I’ve probably also blocked a handful of obscurely named subs that have no description or shit descriptions. Like a sub called grobslafup and the description is “everything related to grobslafup!” As if people know what the obscure thing is but don’t know that a sub titled after it is going to be related to it. 🙄