[techtalk] filename special characters
Conor Daly
conor.daly at oceanfree.net
Mon Jan 22 10:41:28 EST 2001
On Sun, Jan 21, 2001 at 05:25:31PM -0600 or so it is rumoured hereabouts,
ktb thought:
> On Sun, Jan 21, 2001 at 01:45:20PM -0800, Dennis Wheeler wrote:
> >
> > >
> > >
> > > rm "file[2].txt"
> > > will remove the offending file.
> > > kent
> > >
> > >
> >
> > That's true, quoting the filename will let me remove it, but in this case I
> > don't want to remove the file, I want to rename it by removing the '[*]'
> > from the filename. And there are a lot of them in several directories.
> >
> > Verifying that the rename files are unique in thier own folders is a
> > seperate problem that I can solve once I'm able to search and replace the
> > '[]' characters.
> >
>
> find . -name "*\[*\]*" -print
>
And don't forget
find . -name "*\[*\]*" -exec rm {} \;
In case you get a filename that you cannot enter at the commandline, find
should be able to delete it anyhow?
--
Conor Daly <conor.daly at oceanfree.net>
Domestic Sysadmin :-)
---------------------
faenor.cod.ie
9:45am up 90 days, 16:13, 0 users, load average: 0.30, 0.14, 0.08
Hobbiton.cod.ie
9:39am up 17:19, 1 user, load average: 0.05, 0.04, 0.00
More information about the Techtalk
mailing list