How to Rename Similar Files at the Command Prompt Using Sed

Using a simple “script” at the command line, you can rename a bunch of similar filenames with ease. Say you’ve got something like: foo-001, foo-002 and foo-003, but you want them to be bar-001, bar-002 and bar-003. The script will look like : $ for i in `ls -1 foo*`; do mv $i `echo $i [...]