Date: Fri, 14 Feb 2003 20:03:27 -0500 From: parv <parv_fm@emailgroups.net> To: Matthew Hunt <mph@astro.caltech.edu> Cc: David Banning <david@skytracker.ca>, questions@FreeBSD.ORG Subject: Re: how to delete a file called ???? Message-ID: <20030215010327.GA65944@moo.holy.cow> In-Reply-To: <20030212201219.GA84741@wopr.caltech.edu> References: <20030212111232.A6759@skytrackercanada.com> <20030212192143.GA7742@moo.holy.cow> <20030212201219.GA84741@wopr.caltech.edu>
index | next in thread | previous in thread | raw e-mail
in message <20030212201219.GA84741@wopr.caltech.edu>,
wrote Matthew Hunt thusly...
>
> On Wed, Feb 12, 2003 at 02:21:43PM -0500, parv wrote:
>
> > find . -inum $( /bin/ls -i | fgrep '?' | awk '{print $1}' ) -print0 \
> > | xargs -0 rm -f
>
> I'm going to go out on a limb and guess that the filename does not really
> consist of question marks, but rather of unprintable characters that ls
> displays as '?'.
Hey, OP said that file name consisted of '?'. W/o access to OP's
system or due to lacking output of (something like) "ls -B" (FreeBSD
4.7-Release), i rather not guess what-could-be. Me no fs (or
people) mind reader.
Then again i did write "something like" before the proposed
solution (which you omitted from the quote).
:)
> I recommend finding the inode number of the offending file:
>
> $ ls -li
> total 1
> 1238024 -rw-rw-r-- 1 mph mph 1 Feb 12 12:07 ?
>
> The inode number in this case is 1238024. Then you can double-check and
> delete it with find:
>
> $ find . -inum 1238024
> ./+
> $ find . -inum 1238024 -delete
Exactly my point: use "find -inum" to find the offending file(s) & deal
w/ it(them) as appropriate.
- parv
--
To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030215010327.GA65944>
