Results 1 to 10 of 24
I have sent for a copy of Neal Stephenson's - In the beginning was the command line. Knowing that I am very prone to make mistakes, errors, blunders, etc. with ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 10-17-2012 #1
A command line Do Not Do List, Please!!
I have sent for a copy of Neal Stephenson's - In the beginning was the command line. Knowing that I am very prone to make mistakes, errors, blunders, etc. with my computer I figure it is wise to ask now about things I should never do before I get the book and make an idiot of myself.
Any and All Taboos would be greatly appreciated!! Thanks!!AntiX 12 and PCLinuxOS gnome
Linux user # 414321
You Should Not Give In To Evils, But Proceed Ever More Boldly Against Them!! -from book six of Virgil's Aeneid
http://www.paynal.com
Everything Within The Universe Is Related; We Are All Cousins!!
- 10-17-2012 #2
On the command line never run
as root. Not if you want any files left on your disk! AlsoCode:rm -rf /
is very very bad as it will overwrite the disk.Code:any_command > /dev/sda
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 10-17-2012 #3
Ouch and Ouch!!
AntiX 12 and PCLinuxOS gnome
Linux user # 414321
You Should Not Give In To Evils, But Proceed Ever More Boldly Against Them!! -from book six of Virgil's Aeneid
http://www.paynal.com
Everything Within The Universe Is Related; We Are All Cousins!!
- 10-17-2012 #4
If you decide to delete or change a file, make a copy of it first.
Code:cp filename filename.orig
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.
- 10-18-2012 #5forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
Hello, cuz
The majority of commands available do have some beneficial use, but some can be dangerous toward a working system when used carelessly, so I'd say the rule of thumb is don't run any command unless you have some idea about what it is going to do. You can find a nice listing of Linux commands for your review at the following site:
Linux Command Directory - O'Reilly Mediaoz
- 10-18-2012 #6Trusted Penguin
- Join Date
- May 2011
- Posts
- 3,657
One good tip is to set up aliases for the cp/rm/mv commands, so that the '-i' flag is always passed. This will prompt you before deleting/overwriting files. e.g., in my bashrc, I have:
Most distros make this the default now, but I still encounter it every now and then. Of course, this will only work if you don't use the -f/force flag when calling the command:Code:alias mv='mv -i' alias rm='rm -i' alias cp='cp -i'
the "rm -rf" version will still screw you.Code:rm -r *
same thing if you call the binary absolutely (e.g., "/bin/rm *"), that'll override the alias, too.
Along those lines, don't run fdisk (sfdisk, cfdisk, parted, etc.) unless you know what you are doing, are following trusted instructions, and are prepared for the worst.
In fact, don't even use the root account, use sudo (until you really trust yourself). You can still kill your box w/sudo, but at least you have to think about it a little before running half-baked commands.
- 10-18-2012 #7
1) Never do anything as root that you can do as yourself.
2) Never log on as root. You'll forget and break rule 1). Use su or sudo.
3) Always read the man page first."I'm just a little old lady; don't try to dazzle me with jargon!"
- 10-18-2012 #8
I have not gotten the book yet and I'm already terrified!!
AntiX 12 and PCLinuxOS gnome
Linux user # 414321
You Should Not Give In To Evils, But Proceed Ever More Boldly Against Them!! -from book six of Virgil's Aeneid
http://www.paynal.com
Everything Within The Universe Is Related; We Are All Cousins!!
- 10-18-2012 #9
LOL. Don't run anything as root and you should be fine.
If we hit that bullseye, the rest of the dominoes will fall like a house of cards. Checkmate! (Zapp Brannigan)
My new blog. It's probably not as good as I think it is.
The Fifth Continent reborn
- 10-18-2012 #10forum.guy
- Join Date
- May 2004
- Location
- arch linux
- Posts
- 18,733
...or have a good system backup image on hand (and stored elsewhere) so that you can experiment all you want as root with any and all commands. That said, it's a very good idea to have some type of backup on hand no matter how advanced or inexperienced a computer user might be.
oz


4Likes
Reply With Quote

