Rename all the files within a folder with prefix “Unix_”

rename

Rename all the files within a folder with prefix “Unix_” i.e. suppose a folder has two files a.txt and b.pdf than they both should be renamed from a single command to Unix_a.txt and Unix_b.pdf

Best Answer

$ for f in * ; do mv "$f" Unix_"$f" ; done
Related Question