Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
What profit shall it edify a newbie (or anyone) to hide the dangerous effect of 'rm -fr' behind an alias of a friendly interactive 'rm -i' ? In one linux forum I have read that the moderator has warned crooked members who, pretending to help newbies, instead are coaching them to destroy their new system: in that forum article the penalty is deletion, no warning is given.
The fact that a user ambitious enough for that dangerous trick but doesn't know how to write a simple unix/linux alias explains behind that you are not in serious business with linux system nay its young but sprouting community, and for that, I adjure you get back to your dreary world full of Windows and Gates yet imprisoned between the walls of copyrights and patents. Do not come to solicit tricks you can use to fool others to their own frustration. Why don't you go and issue this command in your donkey XP: C:\format C <y> ? For I do not see anything profitable to any linux newbie regarding that trick you are shamelessly asking here.
'rm [options]' command is very dangerous, let me remind everyone here, and may this place not be used to learn foolery to the ruin of others.
I hope this will reach the attention of our forum administrators.
The command you show won't work, it has the wrong syntax.
Assuming that you want to be asked every time you use the rm command: alias rm='rm -i' But......
The -f option overrides the -i option (force and ask don't mix, force "wins").
Only advise I can give you: Set the alias as provided by me and do not use the -f option. This way you are always asked if you want to remove something and have a way out.
And be careful with rm, what you remove can, in general, not be restored.
What profit shall it edify a newbie (or anyone) to hide the dangerous effect of 'rm -fr' behind an alias of a friendly interactive 'rm -i' ? In one linux forum I have read that the moderator has warned crooked members who, pretending to help newbies, instead are coaching them to destroy their new system: in that forum article the penalty is deletion, no warning is given.
The fact that a user ambitious enough for that dangerous trick but doesn't know how to write a simple unix/linux alias explains behind that you are not in serious business with linux system nay its young but sprouting community, and for that, I adjure you get back to your dreary world full of Windows and Gates yet imprisoned between the walls of copyrights and patents. Do not come to solicit tricks you can use to fool others to their own frustration. Why don't you go and issue this command in your donkey XP: C:\format C <y> ? For I do not see anything profitable to any linux newbie regarding that trick you are shamelessly asking here.
'rm [options]' command is very dangerous, let me remind everyone here, and may this place not be used to learn foolery to the ruin of others.
I hope this will reach the attention of our forum administrators.
I don't get what you're saying. Do you have problems understanding the OP, or what?
The effect of aliasing "rm" to "rm -i" and then using "rm -f" depends on the system. On a SunOS I use I have done just that, and issuing "rm -f" still asks interactively, unless I explicitly run rm with full path ("/bin/rm"). Some other commands seem to be picky about the order of the options as well, so I assume it's because of that. In any case, do not use the force switch unless you really intend to force (in which case make sure you know what you do and have recent backups available).
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.