SunQuest
           BSD Help
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
User Name:
Password:
Remember me
Go Back   Dev Shed ForumsOperating SystemsBSD Help

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread Dev Shed Forums Sponsor:
Get inside! Sample the range of functionality easily built with JMSL Library for Time Series Data Analysis, Heat Maps, Portfolio Optimization, Monte Carlo Simulation, Stock Price Charting and more. Download Now!
  #1  
Old February 3rd, 2004, 01:28 AM
phlashlock phlashlock is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Anacortes, WA, USA
Posts: 5 phlashlock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Deleting a directory with symbols and commands in its name

Hi, i have a php script on a FreeBSD that had a little error and ended up creating a folder called:

PHP Code:
<?php echo $photo_path;?>


Now i'm trying to figure out how i would delete this directory as the normal methods i'm familiar with don't seem to work on a dir with a name like this.

Thanks in advance

Reply With Quote
  #2  
Old February 3rd, 2004, 02:26 AM
Silverlokk's Avatar
Silverlokk Silverlokk is offline
Contributing User
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Oct 2002
Location: Manila, Philippines
Posts: 39 Silverlokk User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 32 m 15 sec
Reputation Power: 6
Send a message via ICQ to Silverlokk
"Escaping" the symbols with a backslash, e.g. \$ prevents the shell from treating the $ sign as a prefix to an env variable and usually works.

Regards.

Reply With Quote
  #3  
Old February 3rd, 2004, 02:43 AM
phlashlock phlashlock is offline
Junior Member
Dev Shed Newbie (0 - 499 posts)
 
Join Date: Aug 2003
Location: Anacortes, WA, USA
Posts: 5 phlashlock User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
yep, that did the trick

i used :

rm -R \<\?php\ \echo\ \$photo\_path\;\?\>

and it did the trick.

Thanks again.

Reply With Quote
Reply

Viewing: Dev Shed ForumsOperating SystemsBSD Help > Deleting a directory with symbols and commands in its name


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 5 hosted by Hostway