Find the answer to your Linux question:
Results 1 to 2 of 2
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    Script to Automatically Name and Transfer Files Across an Ad-Hoc Netwo

    Hi all,

    I currently have a USB camera attached to my computer running Ubuntu 10.04 and I was wondering how I could write a Linux script such that whenever it took a picture that picture would be given a certain name (IE. '1'), then transferred over an ad-hoc network to be stored on another computer also running the same version of Ubuntu.

  2. #2
    Do you mean the camera is always attached, even when someone takes a picture?

    How does Linux access the camera's storage, do you know? It could be via gphoto2, mounted as a USB storage device, or some other trickery. If treated as USB storage, then it would be easy to write a script to monitor a directory, sort files by modification date, and copy them to some other directory (network-shared or otherwise). You can make the script a daemon, or simply use cron. I would test heavily before automating the deletion of files on the camera.

    If gphoto2, you'll have to get more involved. You can read up on the APIs, etc. here.

    I'm not sure about auto-naming the files, but there may be a way to do that from within the camera itself.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts