Tuesday, October 26, 2010

copy and backup

find /tmp/test/ -name '*.csv' -exec cp --backup=numbered {} /tmp/test2/ \;

if a file exists in the destination cp will create a copy first like filename.~1~

Thanks to RAMIN the RAMPALO

No comments: