Re: Unable to del an OS file with special char - need ideas

  • From: "Nadeem M. Khan" <nadeem.m.khan@xxxxxxxxx>
  • To: vikramsingh120@xxxxxxxxx
  • Date: Wed, 9 Jul 2008 23:27:25 +0400

On Wed, Jul 9, 2008 at 10:04 PM, vikram singh <vikramsingh120@xxxxxxxxx> wrote:
>
> Hi All,
>
> I have this file by name '-C' created by mistake. I am unable to delete
> this. Any ideas?
>
> [oraapp@greece app]# ls -l
> total 457636
> -rw-r--r--   1 oraapp    oraapp    435824640 Oct  4  2007 -C
> -rw-------   1 oraapp    oraapp     32271367 Oct  4  2007 nohup.out

Theres more than one way to do it. :-)

Delete it by its inode number instead of its filename.

Get its inode number: ls -li
Verify, just to be sure: find . -inum xxxx
Delete it: find . -inum xxxx -exec rm -f {}\;

This is particularly useful when you have *blank* filenames, or
filenames that have characters which cannot be typed. (I'm still to
figure out how these files get created.)

Regards,
NMK.
--
//www.freelists.org/webpage/oracle-l


Other related posts: