Solved

Translation of command line arcana

Posted on 2003-11-21
2
266 Views
Last Modified: 2010-04-22
Hello,

A friend told me to run this on my linux box.

echo me.mo | tr oem fmr | sed 's#\.# -#;s/$/ \//' | sh

I think he's playing a prank on me, so I want to find out what it does.

The points are for (as best you can) a blow-by-blow translation of what's happening and what it means, as opposed to something general, like, "It's bad" or "It'll format your hard drive"

Thanks!
0
Comment
Question by:vlg
2 Comments
 
LVL 45

Accepted Solution

by:
sunnycoder earned 250 total points
ID: 9801744

>echo me.mo |
print string me.mo  ... but this string will not be printed due to | symbol ... it will be used as input to next command

>tr oem fmr |
replace all o with f e with m and m with r ... so you get rm.rf    .... | will pipe it into the next command

>sed 's#\.# -#;s/$/ \//' |
will convert it into rm-rf /

>sh
is nothing but starts a shell

... so you start a shell with rm -rf / ... to erase your / recursively without prompting (all directories)
0
 

Author Comment

by:vlg
ID: 9802511
Brilliant, genius, thank you, exactly what I wanted, sunnycoder -- you are the Man.

I must learn more about sed.  What a mess to look at.

Thanks again,

V
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video discusses moving either the default database or any database to a new volume.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

26 Experts available now in Live!

Get 1:1 Help Now