bash script problem, find , mv tilde files created by gedit

Posted by Ke on Stack Overflow See other posts from Stack Overflow or by Ke
Published on 2010-04-14T19:05:43Z Indexed on 2010/04/14 19:13 UTC
Read the original article Hit count: 336

Filed under:
|
|

Hi,

im using linux with gedit which has the wonderful habit of creating a temp file with a tilde at the end for every file I edit.

im trying to move all of these files at once to a different folder using the following:

find . -iname “*.php~” -exec mv {} /mydir \;

However, its now giving me syntax errors, as if it were searching through each file and trying to move the piece of text. I just want to move all of the files ending in .php~ to another directory. Any idea how I do that?

Cheers Ke

© Stack Overflow or respective owner

Related posts about tilde

Related posts about mv