Evil filename
Web Server forum
Back To The Forum Home!Search!Private Messaging System

Web Server Talk Web Server Talk > Unix and Linux reviews > Free Unix support > Unix Programming > Evil filename




Pages (3): [1] 2 3 »   Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    Evil filename  
Fletcher Glenn


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

While talking with an associate about spaces in Windows filenames, the
question was raised about spaces in UNIX filenames.  This led to the
subject of "hard to remove" files which are usually accidentally
created.  It was then that it occurred to me that the most evil file
name possible is: "-rf *".  Any careless newbie would be in big trouble
trying to delete this file.

--

Fletcher Glenn






[ Post a follow-up to this message ]



    Re: Evil filename  
Victor Wagner


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

Fletcher Glenn <fletcher@removethisfoglight.com> wrote:
> While talking with an associate about spaces in Windows
> filenames, the	question was raised about spaces in UNIX
> filenames.  This led to the  subject of "hard to remove"
> files which are usually accidentally  created.	It was then
> that it occurred to me that the most evil file	name possible
> is: "-rf *".  Any careless newbie would be in big trouble
> trying to delete this file.

what about subdirectory "-rf " with file, starting with newline in it?
Or '-rf ${HOME}'

Few years ago there was vulnerablity discovered in Midnight commander,
that in attempt to enter directory with \3 symbol in its name, it
executed everything which was after \3 as shell command.

--
Journalism will kill you, but it will keep you alive while you're at it.





[ Post a follow-up to this message ]



    Re: Evil filename  
Bjorn Reese


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

Fletcher Glenn wrote:
> While talking with an associate about spaces in Windows filenames, the
> question was raised about spaces in UNIX filenames.  This led to the
> subject of "hard to remove" files which are usually accidentally

My major problem with spaces in file names is when I want to apply some
operation recursively to a file structure. Scripts or commands such as
'find' have to be written with extra care.

> created.  It was then that it occurred to me that the most evil file
> name possible is: "-rf *".  Any careless newbie would be in big trouble
> trying to delete this file.

Or "-rf $HOME"

--
mail1dotstofanetdotdk





[ Post a follow-up to this message ]



    Re: Evil filename  
Keith Thompson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

Fletcher Glenn <fletcher@removethisfoglight.com> writes:
> While talking with an associate about spaces in Windows filenames, the
> question was raised about spaces in UNIX filenames.  This led to the
> subject of "hard to remove" files which are usually accidentally
> created.  It was then that it occurred to me that the most evil file
> name possible is: "-rf *".  Any careless newbie would be in big
> trouble trying to delete this file.

"-rf ." would be slightly worse.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.





[ Post a follow-up to this message ]



    Re: Evil filename  
Måns Rullgård


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

Keith Thompson <kst-u@mib.org> writes:

> Fletcher Glenn <fletcher@removethisfoglight.com> writes: 
>
> "-rf ." would be slightly worse.

And '-rf .*' or '-rf ..' would be even worse.

--
Måns Rullgård
mru@inprovide.com





[ Post a follow-up to this message ]



    Re: Evil filename  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM


"Måns Rullgård" <mru@inprovide.com> wrote in message
news:yw1xirsn3lgo.fsf@ford.inprovide.com...
> Keith Thompson <kst-u@mib.org> writes:
> 
>
> And '-rf .*' or '-rf ..' would be even worse.

I think "-rf /" is the worst possible.

DS







[ Post a follow-up to this message ]



    Re: Evil filename  
Brian Raiter


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

>>> "-rf ." would be slightly worse. 
>
>    I think "-rf /" is the worst possible.

Except that you can't have slashes in filenames.

b





[ Post a follow-up to this message ]



    Re: Evil filename  
Jordan Abel


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

On 2006-01-13, Keith Thompson <kst-u@mib.org> wrote:
> Fletcher Glenn <fletcher@removethisfoglight.com> writes: 
>
> "-rf ." would be slightly worse.

Many implementations forbid . or .. - or any path with one of those as
the final component, from being arguments to rm, and will not either
attempt to remove or recursively descend into them.





[ Post a follow-up to this message ]



    Re: Evil filename  
David Schwartz


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM


"Brian Raiter" <blr@cascadia.drizzle.com> wrote in message
news:dq9617$r4f$1@cascadia.drizzle.com... 
>
> Except that you can't have slashes in filenames.
>
> b

Oh, right!

DS







[ Post a follow-up to this message ]



    Re: Evil filename  
Keith Thompson


View Ip Address Report This Message To A Moderator Edit/Delete Message


 
01-14-06 03:41 AM

"David Schwartz" <davids@webmaster.com> writes:
> "Måns Rullgård" <mru@inprovide.com> wrote in message
> news:yw1xirsn3lgo.fsf@ford.inprovide.com... 
>
>     I think "-rf /" is the worst possible.

Even if '/' were a legal filename character, that would be harmless
unless you have write permissions on the root directory.

--
Keith Thompson (The_Other_Keith) kst-u@mib.org  <http://www.ghoti.net/~kst>
San Diego Supercomputer Center             <*>  <http://users.sdsc.edu/~kst>
We must do something.  This is something.  Therefore, we must do this.





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 04:56 PM.      Post New Thread    Post A Reply      
Pages (3): [1] 2 3 »   Last Thread   Next Thread Next


Most Popular forums 

Forum Jump:
Rate This Thread:

Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is OFF
vB code is ON
Smilies are ON
[IMG] code is OFF
 
Medical and Health forum | Computer Games Reviews | Graphics design forum

Back To The Top
Home | Usercp | Faq | Register