|
Home > Archive > Unix administration > September 2005 > More Unix questions
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
More Unix questions
|
|
| Herbert 2005-09-09, 5: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
| |
|
| Herbert wrote:
> 1. How can I remove a file whose name starts with a dash? Example,
> "-error" ?
rm -- -error
--
reply to usenet only
| |
| Dave Hinz 2005-09-09, 5: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?
| |
| Jeremiah DeWitt Weiner 2005-09-09, 5: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
|
|
|
|
|