linux - Need Help Trimming File Name Text -
i have directory 300 files have naming convention follows:
file.pdf_error
and need remove _error part of file.
i tried
rename 's/pdf_error/pdf/' *pdf_error
but command doesn't anything.
assistance please?
probably rename
not perl rename utility. utilize mv
script:
for f in *.pdf_error; mv "$f" "${f%_error}" done
linux bash
No comments:
Post a Comment