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
[-- Attachment #1 --]
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
>
>
>
[-- Attachment #2 --]
<div dir="auto"><div data-smartmail="gmail_signature" dir="auto"><br></div><br><div class="gmail_quote" dir="auto"><div dir="ltr" class="gmail_attr">On Sat, Feb 11, 2023, 15:59 Per olof Ljungmark <<a href="mailto:peo@nethead.se">peo@nethead.se</a>> wrote:<br></div><blockquote class="gmail_quote" style="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 <br>
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="auto"><br></div><div dir="auto">The usual utility to rename a file is "mv" (no quotes :-)) </div><div dir="auto"><br></div><div dir="auto">Does that help? </div><div class="gmail_quote" dir="auto"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks,<br>
Per<br>
<br>
<br>
</blockquote></div></div>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CADqw_gK_3htmJZicOLLODS-MZJUTwV%2BfttBzVEqsP3KztDk10A>
