Internet Marketing Forum

Internet Marketing Forum


For Webmasters and Entrepreneurs
|
Welcome, Guest. Please login or register.
Did you miss your activation email?
May 17, 2012, 01:01:06 PM

Login with username, password and session length

Only a life lived for others is a life worth..


- Albert Einstein

|-   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 2 Guests are viewing this topic.
Pages: [1] Reply to Thread
Author Topic: Remove a file with a dash as first character in Linux?  (Read 674 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.