[techtalk] filename special characters

Dennis Wheeler Dennis.Wheeler at PictureIQ.com
Sun Jan 21 10:35:55 EST 2001


After more than a year, I still consider my self new to Linux. But it always
seems to be the little things that trip me up the most. For example, I've
only learned recently how to remove filenames with leading dash characters,
'-', in their names. Use a dot-slash in front of the name:

  rm ./-filename

But now I have a new problem. I have a group of files with square bracket
characters, 'file[2].txt' in their names, and I can't figure out how to
search and replace those characters, since the '[]' characters are being
interpreted as special characters in the shell.

  find . -name \*\[ -print
  find . -regex .*\[.* -print

I've tried various combinations of these without success. Any advice on how
to get rid of these characters?

-- Dennis

More information about the Techtalk mailing list