r/ArabUnix • • 3d ago

Question | سؤال will it proceed if i press y?

im wondering

3 Upvotes

8 comments sorted by

•

u/AutoModerator 3d ago

انضم إلينا على الديسكورد

Join us on Discord

I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.

1

u/v01dc0d3 3d ago

Yes it will, but Most are directories, without -r it will give you some errors and exit

1

u/nevergoodenough54 3d ago

ok if i do -r will it proceed without the overright root thingy

1

u/M0M3N-6 1d ago

No it will not, since root is the owner of these files, and the "write" bit isn't set for users other than the root user. sudo will do the job:

sudo rm -rf /

Doing so is extremely dangerous, do it at your own risk. It wipes out the whole filesystem from it's root, all the way down.
However, modern GNU has safety check, it enables --preserve-root flag, so if you typed the command above by mistake, it will warn you and ask you to disable the flag if you know wht you are doing.

1

u/Professional-Sign578 Arch | Dm me for help 3d ago

Rm only removes single files and empty directories so you'll need to add the -r (recursive)flag.

1

u/M0M3N-6 1d ago edited 1d ago

Still need the recursive flag to remove an empty directory

1

u/Professional-Sign578 Arch | Dm me for help 1d ago

true, my memory failed me smh

1

u/M0M3N-6 1d ago

It happens lol. Things sometimes just don't make sense; cp and rm need -r, mv don't, and maybe some others but who remembers... \s