More Unix questions
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 administration > More Unix questions




  Last Thread   Next Thread Next
  Show Printable Version Email this Page Subscribe to this Thread      Post New Thread    Post A Reply      

    More Unix questions  
Herbert


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


 
09-09-05 10:54 PM

Hello again,

I have two more questions:

1. How can I remove a file whose name starts with a dash? Example,
"-error" ?

2. How can I delete an unusually named file using its i-node value?

Many thanks in advance

Regards
Herbert






[ Post a follow-up to this message ]



    Re: More Unix questions  
mgrd


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


 
09-09-05 10:54 PM

Herbert wrote:
> 1. How can I remove a file whose name starts with a dash? Example,
> "-error" ?

rm -- -error

--
reply to usenet only





[ Post a follow-up to this message ]



    Re: More Unix questions  
Dave Hinz


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


 
09-09-05 10:54 PM

On 9 Sep 2005 08:17:08 -0700, Herbert <kang_uni@hotmail.com> wrote:
> Hello again,
>
> I have two more questions:
>
> 1. How can I remove a file whose name starts with a dash? Example,
> "-error" ?

Are you doing homework?  Sure smells like it.  Please google for the
FAQ, it will save us all some time.

> 2. How can I delete an unusually named file using its i-node value?






[ Post a follow-up to this message ]



    Re: More Unix questions  
Jeremiah DeWitt Weiner


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


 
09-09-05 10:54 PM

Herbert <kang_uni@hotmail.com> wrote:
> I have two more questions:

Please give your posts a more descriptive subject.  Just about every
post here is a unix question.


> 1. How can I remove a file whose name starts with a dash? Example,
> "-error" ?

rm ./-error
People will suggest other methods, but this is the most universally
applicable.


> 2. How can I delete an unusually named file using its i-node value?

Assuming the inode is 12345,
find . -inum 12345 -exec rm {}\;

--
Oh to have a lodge in some vast wilderness.  Where rumors of oppression
and deceit, of unsuccessful and successful wars may never reach me
anymore.
-- William Cowper





[ Post a follow-up to this message ]



    Sponsored Links  




 





   All times are GMT. The time now is 05:20 PM.      Post New Thread    Post A Reply      
  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