Warning: Some posts on this platform may contain adult material intended for mature audiences only. Viewer discretion is advised. By clicking ‘Continue’, you confirm that you are 18 years or older and consent to viewing explicit content.
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 /).
You also need the flag “–no-preserve-root”.
No you don’t.
rm -fr /
requires the flag, butrm -fr /*
does not.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/
).Yes, the * is expanded by the shell so the rm command just sees lots of individual files being passed in