Date: Sat, 11 Feb 2023 16:23:31 +0100 From: Michael Schuster <michaelsprivate@gmail.com> To: Per olof Ljungmark <peo@nethead.se> Cc: freeBSD Mailing List <freebsd-questions@freebsd.org> Subject: Re: remove double quote character from file names Message-ID: <CADqw_gK_3htmJZicOLLODS-MZJUTwV%2BfttBzVEqsP3KztDk10A@mail.gmail.com> In-Reply-To: <d83c93ad-0eac-d41a-c7db-79a1e1bc62d8@nethead.se> References: <d83c93ad-0eac-d41a-c7db-79a1e1bc62d8@nethead.se>
next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000001498fe05f46e33ab Content-Type: text/plain; charset="UTF-8" On Sat, Feb 11, 2023, 15:59 Per olof Ljungmark <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 > > > --0000000000001498fe05f46e33ab Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"auto"><div data-smartmail=3D"gmail_signature" dir=3D"auto"><br>= </div><br><div class=3D"gmail_quote" dir=3D"auto"><div dir=3D"ltr" class=3D= "gmail_attr">On Sat, Feb 11, 2023, 15:59 Per olof Ljungmark <<a href=3D"= mailto:peo@nethead.se">peo@nethead.se</a>> wrote:<br></div><blockquote c= lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;= padding-left:1ex">Hi all,<br> <br> A little help on the way, I need to find and remove the double quote ("= ;) <br> character from all files in a directory structure containing hundreds of <b= r> thousands of files.<br> <br> I am sure plenty of you have done this before... I've gotten as far as<= br> <br> find . -type f -name '*"*' -exec rename 's|"|in|g'= ; {} \;<br> find: rename: No such file or directory<br> <br> The find part works but not renaming so I'm missing something there.<br= ></blockquote></div><div dir=3D"auto"><br></div><div dir=3D"auto">The usual= utility to rename a file is "mv" (no quotes :-))=C2=A0</div><div= dir=3D"auto"><br></div><div dir=3D"auto">Does that help?=C2=A0</div><div c= lass=3D"gmail_quote" dir=3D"auto"><blockquote class=3D"gmail_quote" style= =3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"> <br> Thanks,<br> Per<br> <br> <br> </blockquote></div></div> --0000000000001498fe05f46e33ab--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_gK_3htmJZicOLLODS-MZJUTwV%2BfttBzVEqsP3KztDk10A>