GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
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.
while in my coding directory, the one with all my projects and for some not-so-well-though-out reason it also includes my primary subversion repository, i was testing out a copy script that was copying some files to a temp dir in that dir. i got the script working and wanted to clear out the temp dir and test one more time just to be sure so i issued a
rm * temp/ -Rf
this boys and girls is why you DO NOT WORK ON A FRIDAY NIGHT!
after 7+ years on linux i still amaze myself with idiotic taps of my fingers
"WARNING: The command you have chosen will result in the deletion of 3,050,110 file(s). Are you certain that you wish to continue? (y/N)"
thats funny. seriously i am laughing for the first time in the last hour.. in my case it was probably only about 5,000 files, but when you get up over the 1000 mark of important files, the remainder really doesnt matter..
Quote:
Originally Posted by General
There should be some sorm of protection against this sort of thing, built right into BASH.
maybe, but if you bring this up to most linux people though they will say "bah!, dont be an idiot".. and normally i would say about that same thing also. probably a good "in someone elses shoes" moment.
just a stupid mistake. the asterix is now my most hated enemy.
Quote:
Originally Posted by stitchman
i need sleep too
yes i would go to sleep but i am afraid that i will dream about rm * commands
man, rm already has that prompt/warning for deleting files, but if you choose to override it using the -f option, God help you.
From the manual of rm
Code:
-f, --force
ignore nonexistent files, never prompt
yeh good point. BUT, there is only a rm warning for write protected files, that is mainly what the -f is used to override. and there was only a couple of files that were write protected in the dir i was dumping. unfortunately, all the files in the .svn dirs in my eclipse workspace were some of those because of the erroneous rm command.
i am not an advocate for changing rm, however now i am an advocate for not being a moron.
<begin obvious>
Yes, I know. Sometimes we use options without thinking at all. Unfortunately a computer, not being an intelligent being, just does what we ask it to do. Nothing more or less.
</end obvious>
It happens to all of us at times. I once cleaned out my Debian installation because I overwrote the wrong partition.
Sometimes it's better to use a GUI mode for these kinds of things as we know exactly what we're doing. CLI is very powerful and sometimes that power can be more than we can handle.
Last edited by vharishankar; 09-16-2006 at 12:27 AM.
yeh a person can talk alot of smack about how using the cmd line is way better, until that person goes and does something like that person did.. then that person wishes they had the trash bin to recover their dignity from.
eh, still this is not enough to drive me to using a gui anymore than i do now. its just a bump in the road. i have done many a dumb thing over the years, this is just another on the list.
atleast all of my work-work is backed up at work, i only lost about 3 hours of time. but i did lose about 5 personal projects that i had put alot of time into..
now my only hope is that the whiskey will cure the pain..
I read this thread way late last night, and wouldn't you know it: I woke up this morning all freaked out after I dreamed I did the same thing (Worse yet, I don't have any backup hardware yet).
P.S. And don't get me started on the part where it got all psychadelic and the screen started rolling and melting. That's just typical of my dreams.
Dang that sucks. I do most of my rm from the command line, but things like this remind me why I should NEVER use the -f option. I'd rather sit and type "y" over and over again than do something like that.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.