Results 1 to 10 of 20
A note to those of you new to Linux, and even the veterans. Save this info in your mind, and never forget it. It might save you a nervous breakdown.
...
- 02-16-2008 #1
A word to Linux newbies.
A note to those of you new to Linux, and even the veterans. Save this info in your mind, and never forget it. It might save you a nervous breakdown.
When you are following online instructions or advice on how to do something in the terminal, be very, very, very careful about anything that removes a file or directory. This is the "rm" command, and can possibly be followed by the -r or -f or both, i.e., -fr
Yesterday, I was following some instructions, and I was therein asked to remove a directory. I used the rm -fr command (which is to say I forced the deletion without confirmation and did it recursively so all files inside that directory were deleted too). I erred in the path of the directory, and lost quite a lot of very important, and system critical data. Although it's not impossible to recover it, the chances of success are virtually zero without very advanced knowledge of your system.
So I spent most of my night recovering, needless to say. I was able to piece-meal everything back together from old CD's with data I had saved at one point, my flash drive, and the Ubuntu install CD. But it was a pain in the ass.
Be very careful with your commands. Linux demands a certain amount of self accountability. I'm sure there are those out there who make some critical mistake in Linux and are turned off because of it, not realizing that in Linux-land, the system actually does what you tell it to...
- 02-16-2008 #2
It absolutely sucks that you had to learn this the hard way. Glad you were able to get it fixed.
I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 02-16-2008 #3
I must confess I usually man command_name or info command_name first before following instructions. That way I think I know what the results are going to be.
(still has not saved me from some stupid mistakes!)
There are plenty of commands which can result in major issues if not used carefully. Press the tab key twice in a terminal and you will be prompted something along the lines ...
Trying to remember all options for all commands is not practical, I find the more I use linux the more I use the man and info commands!Code:Display all 1978 possibilities? (y or n)

Being an ex-DOSer I did have a bad habit of trying command_name -h ... but after I got a shock with a command which ignored the -h and executed anyway I stopped doing that.
- 02-16-2008 #4I do not respond to private messages asking for Linux help, Please keep it on the forums only.
All new users please read this.** Forum FAQS. ** Adopt an unanswered post.
- 02-19-2008 #5Just Joined!
- Join Date
- Feb 2008
- Posts
- 0
- 02-19-2008 #6
Good advice.I also learnt the hardway when I was a Linux newbie. I intended to delete a file in /usr/local and entered something like " / usr/local/somepath". I realised my error within seconds but I had lost most of the commands in /bin so had to reinstall because I did not have a backup.
- 02-19-2008 #7
Here's what could happen!
Distribution: Archlinux
Processor: 3 x Amd 64 bit
Ram: 4 GB
Graphics card: Nvidia GeForce 9800 GT
- 02-19-2008 #8
I think all of us have had mishaps at some point using the rm -rf command. I lost a whole directory myself once in the same way! Now, whenever using rm -rf, I stop and visually inspect the exact command for errors before pressing enter. Thanks for the informative and useful information. We all can stand reminding about these things from time to time.
- 02-19-2008 #9From my experience, this is the best way to prevent critical damage. I am talking about computing in every sense, and with every platforms. Whether you are using Linux, Mac, MSWindows or any other OS, you should never ever do normal work as root.do user activities logged in as a normal user!
I believe this is the best anti-virus on the market. If you don't have the administrator's rights, how can a virus get installed.
Cheers
- 02-20-2008 #10
Indeed! I've made a fair amount of mistakes because I didn't follow this rule, and learned the right things the wrong way
And I can't tell you how many times I have to help clean up a machine for friends or family because they won't use a regular profile for normal work. they just don't wanna take the minute or two to switch profiles/accounts.
Oh well... What can ya do?
Jay
New users, read this first.
New Member FAQ
Registered Linux User #463940
I do not respond to Private Messages asking for Linux help. Please, keep it on the public boards.


Reply With Quote

