You are viewing a single thread.
View all comments View context
12 points

You also need the flag “–no-preserve-root”.

permalink
report
parent
reply
15 points

No you don’t.

rm -fr / requires the flag, but rm -fr /* does not.

permalink
report
parent
reply
5 points

I think that is only if you pass /, I don’t think the flag is required for /* which is what is shown here - if I remember right, it’s because the * triggers the shell to expand the paths and that flag is only built to protect / (from say, having an empty variable alongside /).

permalink
report
parent
reply
3 points

Yes, the * is expanded by the shell so the rm command just sees lots of individual files being passed in

permalink
report
parent
reply

linuxmemes

!linuxmemes@lemmy.world

Create post

I use Arch btw


Sister communities:
Community rules
  1. Follow the site-wide rules and code of conduct
  2. Be civil
  3. Post Linux-related content
  4. No recent reposts

Please report posts and comments that break these rules!

Community stats

  • 7.7K

    Monthly active users

  • 1.3K

    Posts

  • 69K

    Comments