Re: removing files with unprintable characters in their filename
Thank you very much for the reply!!!
THe --escape and -b are the same options, with the same output, but the
$'<ouput>' was new to me & works.
I have always though to completely understand shell quoting is to become
one with the shell...
On Wed, 18 Sep 2002, Pietro Cagnoni wrote:
> Mark T. Valites wrote:
> > Every once in a while, either a user somehow comes up with a file with
> > funky characters, or I create one by accident. When displayed through a
> > 'ls', the non-printable characters are displayed with "?"s. The "?"s are
> > not literal question marks, but just represent an unprintable character.
> > Without using shell meta characters (*), C, perl, loops, find or anything
> > other than just the rm command, I haven't been able to figure out how to
> > remove this file. There has to be a way to get rid of it with rm, but I
> > have had no such luck with it so far by quoting, escaping, using "--",
> > "./" or any other magic I can think of.
> with a little help from man ls && man bash:
> ls --escape will print the escape sequences for funky characters;
> rm $'<pasted from ls --escape output>' will then work.
> hope this helps!
Mark T. Valites
Unix Systems Analyst
1 College Circle - 124b1 South Hall
Geneseo, NY 14454