Answered by : nutty-newt-v698x4vh3pkp
$ for i in *.log; do mv -- "$i" "${i%.log}.txt"; done
Source : https://linuxconfig.org/how-to-rename-multiple-files-on-linux | Last Update : Wed, 04 May 22
Answered by : azza-ahmed
{"tags":[{"tag":"textarea","content":"rename 's\/test-this\/REPLACESTRING\/g' *","code_language":"whatever"}]}
Source : https://stackoverflow.com/questions/20657432/rename-multiple-files-but-only-rename-part-of-the-filename-in-bash | Last Update : Tue, 04 Apr 23
Answered by : david-diamant
$ for i in $( ls ); do mv $i $i.old; done
Source : | Last Update : Thu, 22 Jul 21
Answered by : nutty-newt-v698x4vh3pkp
$ for i in $( ls ); do mv $i $i.txt; done
Source : https://linuxconfig.org/how-to-rename-multiple-files-on-linux | Last Update : Wed, 04 May 22
Answered by : worrisome-wildebeest-k5u305yy8ego
find . -name "*.txt" -exec mv {} {}_backup \;
Source : | Last Update : Mon, 04 Dec 23
Answered by : careful-curlew-ta4s0puwcogb
for f in *.html; do mv -- "$f" "${f%.html}.php"
done
Source : | Last Update : Mon, 31 May 21
Answered by : ashirbad-panigrahi
# Change all jpeg to jpg
for f in *.jpeg; do mv -- "$f" "${f%.jpeg}.jpg"
done
Source : | Last Update : Thu, 13 Jan 22
Answered by : cheerful-capuchin-beyv9ihnczkw
for f in *.jpg; do mv "$f" "$(echo "$f" | sed s/IMG/VACATION/)"; done
Source : https://stackoverflow.com/questions/6840332/rename-multiple-files-by-replacing-a-particular-pattern-in-the-filenames-using-a | Last Update : Tue, 08 Sep 20
Answered by : cheerful-capuchin-beyv9ihnczkw
rename 's/^/MyVacation2011_/g' *.jpg
Source : https://stackoverflow.com/questions/6840332/rename-multiple-files-by-replacing-a-particular-pattern-in-the-filenames-using-a | Last Update : Tue, 08 Sep 20
Answered by : azza-ahmed
{"tags":[{"tag":"textarea","content":"for i in test-this*\ndo\n mv \"$i\" \"${i\/test-this\/foo}\"\ndone","code_language":"whatever"}]}
Source : https://stackoverflow.com/questions/20657432/rename-multiple-files-but-only-rename-part-of-the-filename-in-bash | Last Update : Tue, 04 Apr 23