perl -e 'opendir(D,".");for (grep /~$/, readdir D){s/~$//;rename("$_~","$_");}'