Re: remove double quote character from file names
Date: Sat, 11 Feb 2023 16:43:07 UTC
On 2/11/23 16:43, Scott Ballantyne wrote: > > Remove the first echo command to actually do any changes. Untested. > for f in $(find . -type f -name '*"*'); do echo mv $f $(echo $f | tr -d > '"'); done Produced "No such file or directory" errors. > On Sat, Feb 11, 2023 at 10:23 AM Michael Schuster > <michaelsprivate@gmail.com <mailto:michaelsprivate@gmail.com>> wrote: > > > > On Sat, Feb 11, 2023, 15:59 Per olof Ljungmark <peo@nethead.se > <mailto:peo@nethead.se>> wrote: > > Hi all, > > A little help on the way, I need to find and remove the double > quote (") > character from all files in a directory structure containing > hundreds of > thousands of files. > > I am sure plenty of you have done this before... I've gotten as > far as > > find . -type f -name '*"*' -exec rename 's|"|in|g' {} \; > find: rename: No such file or directory > > The find part works but not renaming so I'm missing something there. > > > The usual utility to rename a file is "mv" (no quotes :-)) > > Does that help? > > > Thanks, > Per > >