- Home
- Learn Linux
- Learn Electronics
- Raspberry Pi
- Programming
- Projects
- LPI certification
- News & Reviews
22 April 2008
Here are some short scripts that can be used to rename files in Linux.
These are examples that can be modified as required.
Rename all files in a directory that end with .php5 to end with .php
for x in *.php5; do n=${x/.php5/.php}; mv $x $n; done
for x in *.jpg; do mv $x prefix_$x; done