1

I'm creating a large number of gifs and copying them to a separate computer with a webserver folder mounted via sshfs.

For some reason the files will randomly copy with *.gif.001 file extensions. My scripted command is:

scp IMG_* [email protected]:/home/USER/MOUNTED_FOLDER/

Where IMG_* is the file pattern (i.e. IMG_1.gif, IMG_2.gif, etc)

I am generating new images to replace files with the same name in the web folder.

Does anyone know how to stop the *.001 file extensions from appearing?

6
  • 1
    Quite honestly I kind of doubt it's a result of scp work. That would be a bit bizarre, as scp normally overwrites files if they exist. Have you actually checked what's really in your source dir before you started copying files?
    – Jacek
    Apr 9, 2015 at 13:00
  • I'm not quite 100% sure but I think this might be a temporary file. Do you still have those files when the copy process is done?
    – s1mmel
    Apr 9, 2015 at 13:09
  • Maybe they are supposed to be temporary? The originals definitely don't update when the *.00# files are generated. Here is the web directory where these files are going as an example: weather.uncc.edu/data/nexrad/CLT
    – WxPilot
    Apr 9, 2015 at 14:27
  • Could it be some sort of automated version control system on the destination computer? Apr 9, 2015 at 15:23
  • WxPilot - anyway - if you don't want temporary/backup files copied, you may use rather IMG_*.gif instead, to copy only the files you're interested in. How to prevent creation of temporary files is rather kind of separate subject, I'd say - referring rather to the app you use for processing pictures.
    – Jacek
    Apr 10, 2015 at 13:47

1 Answer 1

1

The application was the issue since, as everyone suggested, scp functionality means these files would never appear.

As it turns out, the application I use was generating the *.00# files if it couldn't do a direct replacement.

My fix was to remove the old images from the folder before running the program, and do a more specific cp, as Jacek suggested in the comments (i.e. scp IMG_*.gif USER@SERVER:XX.XX.XXX.XXX:/home/USER/)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .