for i in `find . -type f`
do
cp "${i}" "${i}.bak"
done
This fails when filenames contain spaces, as bash uses whitespace, tab and LF as the default delimiter. Solution? Do this:
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")
Please fill in the below form to get in contact with me. Subject and message fields are required.
for i in `find . -type f`
do
cp "${i}" "${i}.bak"
done
SAVEIFS=$IFS
IFS=$(echo -en "\n\b")