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

  • From: William Robertson <william@xxxxxxxxxxxxxxxxxxxx>
  • To: freelists <oracle-l@xxxxxxxxxxxxx>
  • Date: Wed, 09 Jul 2008 19:26:07 +0100

One way:

   $ touch C.dat
   $ echo > -C
   $ ls -l | grep C
   -rw-r--r--     1 williamr  staff        1 Jul  9 19:21 -C
   -rw-r--r--     1 williamr  staff        0 Jul  9 19:21 C.dat

   $ rm nosuchfile -C
   rm: nosuchfile: No such file or directory

$ ls -l | grep C -rw-r--r-- 1 williamr staff 0 Jul 9 19:21 C.dat



Another way:

   find . -name -C -exec rm {} \;




-----Original message-----
From: vikram singh
Date: 9/7/08 19:04
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/
How can i delete the '-C' file? Thanks, Vikram

Other related posts: