Solved

Translation of command line arcana

Posted on 2003-11-21
2
270 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever been frustrated by having to click seven times in order to retrieve a small bit of information from the web, always the same seven clicks, scrolling down and down until you reach your target? When you know the benefits of the command l…
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…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 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