Remove prefix from multiple files in Linux console

Bash:


The for loop iterates over all files with the prefix. The do removes from all those files iterated over the prefix.

Here is an example to remove “bla_” form the following files:

Command

Result in file system:

 

(163 Posts)

20 years of coding and working as software engineer but I am still eager to learn more. I am very passionate when it comes to open source, Linux and Java. But I made my peace with Windows long ago to fully enjoy my PC gaming hobby. I have a soft spot for 90s electronic music and Babylon 5.