107

Bonus points if someone warned you and you went ahead anyway.

you are viewing a single comment's thread
view the rest of the comments
[-] tal@lemmy.today 18 points 1 month ago* (last edited 1 month ago)

On Linux, about twenty-five years back, on stock Red Hat Linux (and, I suspect, all Linux distributions) the bash shell used to match .* against both . -- the current directory -- and .. -- the parent directory.

This means that if you ran rm -rf .* in a directory, you'd delete all the files starting with a "." -- "hidden" files in the current directory. You'd also start recursively-deleting the contents of the parent directory.

This led to all kinds of excitement if, in a directory in your home directory, you'd try deleting all dotfiles. The rm command would also attempt to wipe out all of the contents of your home directory -- all of your files. And this isn't a system where there's some "undo delete" option, unless you had a backup system in place (which is a good idea, but wasn't something set up by default).

These days, bash doesn't do that.

EDIT: I'd also add that that was the single major reason that I initially liked zsh, a competing shell. It didn't do that by default.

EDIT2: A possibly-more-applicable-today thing I also learned the hard way: "Make backups. The cost is worth it."

this post was submitted on 03 Aug 2024
107 points (97.3% liked)

Ask Lemmy

26293 readers
952 users here now

A Fediverse community for open-ended, thought provoking questions


Rules: (interactive)


1) Be nice and; have funDoxxing, trolling, sealioning, racism, and toxicity are not welcomed in AskLemmy. Remember what your mother said: if you can't say something nice, don't say anything at all. In addition, the site-wide Lemmy.world terms of service also apply here. Please familiarize yourself with them


2) All posts must end with a '?'This is sort of like Jeopardy. Please phrase all post titles in the form of a proper question ending with ?


3) No spamPlease do not flood the community with nonsense. Actual suspected spammers will be banned on site. No astroturfing.


4) NSFW is okay, within reasonJust remember to tag posts with either a content warning or a [NSFW] tag. Overtly sexual posts are not allowed, please direct them to either !asklemmyafterdark@lemmy.world or !asklemmynsfw@lemmynsfw.com. NSFW comments should be restricted to posts tagged [NSFW].


5) This is not a support community.
It is not a place for 'how do I?', type questions. If you have any questions regarding the site itself or would like to report a community, please direct them to Lemmy.world Support or email info@lemmy.world. For other questions check our partnered communities list, or use the search function.


Reminder: The terms of service apply here too.

Partnered Communities:

Tech Support

No Stupid Questions

You Should Know

Reddit

Jokes

Ask Ouija


Logo design credit goes to: tubbadu


founded 1 year ago
MODERATORS