Tuesday, May 26, 2015

How to Add Prefix to all files in the folder

# Method 1
for f in * ; do mv "$f" "PRE_$f" ; done

# Method 2 
ls | xargs -I {} mv {} PRE_{}
ls | xargs -I {} mv {} {}_SUF