| delorie.com/archives/browse.cgi | search |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sources.redhat.com/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs> |
| Sender: | cygwin-owner AT cygwin DOT com |
| Mail-Followup-To: | cygwin AT cygwin DOT com |
| Delivered-To: | mailing list cygwin AT cygwin DOT com |
| X-WebMail-UserID: | pjacklam AT online DOT no |
| Date: | Fri, 16 Jan 2004 13:29:00 +0100 |
| From: | "Peter J. Acklam" <pjacklam AT online DOT no> |
| To: | Baurjan Ismagulov <ibr AT ata DOT cs DOT hun DOT edu DOT tr>, |
| cygwin <cygwin AT sources DOT redhat DOT com> | |
| X-EXP32-SerialNo: | 50000140 |
| Subject: | RE: deleting a file ending with a dot |
| Message-ID: | <400A13A0@epostleser.online.no> |
| Mime-Version: | 1.0 |
| X-IsSubscribed: | yes |
Baurjan Ismagulov <ibr AT ata DOT cs DOT hun DOT edu DOT 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 AT online DOT 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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |