This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: deleting a file ending with a dot


Baurjan Ismagulov <ibr@ata.cs.hun.edu.tr> wrote:

> tar has created a file ending with a dot, and now I can't delete
> it (I've tried rm, del in cmd, explorer, far, unlink call with
> and without -mno-cygwin). What would you suggest before I search
> an 8-GB volume for the directory entry with a disk editor? I
> would appreciate any help (pointers to NTFS directory structure
> description also welcome).  Scandisk didn't report any problems.

A common way in Unix to delete files with strange names is by
using the inode number:

    ls -1ib DIR                               # find inode number NUM
    find DIR -xdev -inum NUM -exec rm {} \;   # remove the file

but, alas, I don't think that works either.

But I wonder how you created this file in the first place.  It
seems to me that trailing dots are removed.  Here is what I get
when I extract a tar file containing files with trailing dots.
(The tar file was created on Solaris.):

   $ tar xvf bad.tar
   foo/
   foo/bar0
   foo/bar1.
   foo/bar2..
   foo/bar3...
   foo/bar4....
   foo/bar5.....

   $ ls -1 foo
   bar0
   bar1
   bar2
   bar3
   bar4
   bar5

The dots are gone.

Peter

-- 
Peter J. Acklam - pjacklam@online.no - http://home.online.no/~pjacklam


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]