Internet Marketing Forum

Internet Marketing Forum


For Webmasters and Entrepreneurs
GoDaddy.com Hosting just $1.99/mo! - 468x60
|
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 23, 2012, 07:57:23 AM

Login with username, password and session length

Naked a man comes from his mother’s womb, and as he comes, so he departs. He takes nothing from his labor that he can carry in his hand.


- King Solomon

|-   Internet Marketing Forum > Online Business Discussions > Website Design and Maintenance > Administration
+  

Remove a file with a dash as first character in Linux?

0 Members and 1 Guest are viewing this topic.
Pages: [1] Reply to Thread
Author Topic: Remove a file with a dash as first character in Linux?  (Read 686 times)
OfflineBCaruso
New Member
BCaruso is on a distinguished road
Joined: Oct 2011
Posts: 8


anonymous avatar

View BCaruso\s Profile
United States
notepad Oct 26, 2011, 08:56:49 PM #1
I'm new to Ubuntu Linux and on accident I created a file with a dash as the first character. I try to remove it with the rm command and I get this error

rm: invalid option -- 8
Try `rm ./-858993460.jpg' to remove the file `-858993460.jpg'.
Try `rm --help' for more information.


How do I remove this file ?

OfflineAceCoder
Junior Member
AceCoder is on a distinguished road
Joined: Oct 2007
Posts: 79



View AceCoder\s ProfileWWW
United States
notepad Oct 27, 2011, 07:28:16 PM #2
The answer is right there in the error. Just add the directory path as follows

Code:
rm ./-858993460.jpg

Mistake

Latest Blog Post : PHP – Pass by Reference or Pass by Value

Summer Savings! $7.49 .com domains at GoDaddy.com!
Pages: [1] Reply to Thread


Code4Gold Internet Marketing Forum © 2006-2011 Resdaz Media LLC - All Rights Reserved
Forum Software Powered by SMF - © 2001-2008, Lewis Media. All Rights Reserved.