I have a set of image like that :01-12_13:20:12_1366x768.png  01-12_13:20:46_1366x768.png  01-12_13:21:01_1366x768.png  01-12_13:21:06_1366x768.png01-12_13:20:40_1366x768.png  01-12_13:20:47_1366x768.png  01-12_13:21:02_1366x768.png  01-12_13:21:07_1366x768.png01-12_13:20:42_1366x768.png  01-12_13:20:49_1366x768.png  01-12_13:21:03_1366x768.png  01-12_13:21:08_1366x768.png01-12_13:20:44_1366x768.png  01-12_13:20:59_1366x768.png  01-12_13:21:04_1366x768.png  01-12_13:21:10_1366x768.png01-12_13:20:45_1366x768.png  01-12_13:21:00_1366x768.png  01-12_13:21:05_1366x768.pngI need to replace every : to _. How can I do that using bash commands ?(note : i love when everything is compact and one-lined)
how to replace a character in a set of file names?
bash;files;fedora;rename
You can use a simple for loop, glob and parameter expansion to achieve this:for f in *:*.png; do mv -- $f ${f//:/_}; done