I wanna back up the original version of files in a directory by appending .ORIG to them. I'm guessing I'd need CP and AWK in some form or fashion. Can someone give me a template? Thanks
find /path/to/directory -maxdepth 1 -type f -exec echo cp -a {} {}.ORIG \;
Did you ever consider snapshots or snapshot-like using rsync ?
Nah didn't know about it, I'll give it a peep
for F in *; do cp "$F" "${F}.ORIG"; done
To exlude already backuped files:
for F in *; do [ "${F##*.}" != "ORIG" ] && cp "$F" "${F}.ORIG"; done