Answers for "linux change filename batch"

0

linux change filename batch

# method 1 (from the beggining of filename)
rename.ul filename_foo filename_bar *.png

# method 2 (replace some portion of filename)
for filename in *foo*; do echo mv \"$filename\" \"${filename//foo/bar}\"; done > rename.txt
# check commands then
for filename in *foo*; do echo mv \"$filename\" \"${filename//foo/bar}\"; done | /bin/bash
Posted by: Guest on September-13-2021

Code answers related to "Shell/Bash"

Browse Popular Code Answers by Language