So I have these files:
Movies % ls -l *."pdf - yts"
-rw-r--r--@ 1 staff 1848890 Mar 18 00:11 Scanned Document 1.pdf - abc
-rw-r--r--@ 1 staff 1848890 Mar 18 00:11 Scanned Document 2.pdf - abc
-rw-r--r--@ 1 staff 1848890 Mar 18 00:11 Scanned Document 3.pdf - abc
-rw-r--r--@ 1 staff 1848890 Mar 18 00:11 Scanned Document 4.pdf - abc
Movies %
and I need to rename the extensions from .pdf - abc to just .pdf.
I tried this:
mv *."pdf - yts" "*.pdf"
but got this error:
zsh: no matches found: *.pdf
Is there a one-liner that I can use here? Or is my command not formatted correctly?
ls -l *."pdf - yts"doesn't match the- abcsuffixes you show on the files. – grg Jul 15 '23 at 06:07*.pdf-- it doesn't mention- yts– Barmar Jul 16 '23 at 03:12zmvwould be a suitable. See man zshcontrib and serarch forzmvto see, how this is used. Note that you have to do anautoload zmvfirst, to make this command available. – user1934428 Jul 17 '23 at 07:25