Man Linux: Main Page and Category List


       gphoto2 - command-line gphoto2 client


       gphoto2 [--debug] [--debug-logfile FILENAME] [[-q] | [--quiet]] [[-v] |
               [--verbose]] [[-h] | [--help]]
               [--hook-script FILENAME]
               [--list-cameras] [--list-ports] [--stdout] [--stdout-size]
               [--auto-detect] [--port PATH] [--speed SPEED] [--camera MODEL]
               [--filename FILENAME]
               [--usbid USBIDS]
               [[-a] | [--abilities]]
               [[--folder FOLDER] | [-f FOLDER]] [[[-R] | [--recurse]] |
               [[-l] | [--list-folders]]
               [[-L] | [--list-files]] [[-m NAME] | [--mkdir NAME]]
               [[-r NAME] | [--rmdir NAME]] [[-n] | [--num-files]]
               [[-p RANGE] | [--get-file RANGE]] [[-P] | [--get-all-files]]
               [[-t RANGE] | [--get-thumbnail RANGE]]
               [[-T] | [--get-all-thumbnails]]
               [--get-raw-data RANGE] [--get-all-raw-data]
               [--get-audio-data RANGE] [--get-all-audio-data]
               [[-d RANGE] | [--delete-file RANGE]] [[-D] |
               [[-u FILENAME] | [--upload-file FILENAME]] [--config]
               [--get-config CONFIGENTRY]
               [--set-config CONFIGENTRY=CONFIGVALUE]
               [[-F COUNT] | [--frames COUNT]] [[-I SECONDS] |
               [--interval SECONDS]]
               [--capture-image] [--capture-movie] [--capture-sound]
               [--show-info RANGE]
               [--show-exif RANGE]
               [--storage-info] [--summary] [--manual] [--about] [--shell]


       libgphoto2(3) is a cross-platform digital camera library, and
       gphoto2(1) is a command-line client for it.

       Where an option takes a RANGE of files, thumbnails, or other data, they
       are numbered beginning at 1. A range is a comma-separated list of
       numbers or spans (“first-last”). Ranges are XOR (exclusive or), so that
       “1-5,3,7” is equivalent to “1,2,4,5,7”.

           Turn on debugging output. Debugging output is written to stderr by
           default, or to the filename given to the --debug-logfile option.

       --debug-logfile FILENAME (since 2.3.0)
           The logfile to write the debugging info to, if --debug is given.

       --hook-script FILENAME (new after 2.3.0)
           Execute the hook script FILENAME every time a certain event happens
           within gphoto2. The hook script reads the environment variable
           ACTION. It must ignore ACTION values unknown to it.


                   gphoto2 has just been initialized. If the hook script
                   returns with a non-zero exit code now, gphoto2 will abort.


                   gphoto2 has just finished parsing the command line and is
                   about to start executing the commands given on the command


                   gphoto2 has just downloaded a file to the computer, storing
                   it in the file indicated by the environment variable


                   gphoto2 is about to finish. Do your final cleanups here.

               All other environment variables are passed to the hook script
               unchanged. You can make use of that to pass data to the hook

               Hook script may be specified in the ~/.gphoto/settings file as

       -q, --quiet
           Quiet output (default=verbose).

       -v, --version
           Display version and exit.

       -h, --help
           Display a short usage message.

           List supported camera models.

           List supported port devices.

           Send file to stdout.

           Print filesize before data.

           List auto-detected cameras and the ports to which they are

       --port PATH
           Specify port device. The --list-ports prints a list of valid,
           usable ports. In case of multiple USB cameras, the --auto-detect
           shows you the specific port each camera is connected to.

       --speed SPEED
           Specify serial transfer speed.

       --camera MODEL
           Specify camera model. The --list-cameras option prints a list of
           all explicitly supported cameras.

           Most model names contain spaces: remember to enclose the name in
           quotes so that the shell knows it is one parameter. For example:
           --camera "Kodak DC240".

           Note that if you specify --camera, you must also specify --port.
           Otherwise the --camera option will be silently ignored.

       --filename FILENAME
           When downloading files from the camera, specify the file name or
           file name pattern to use when storing the downloaded file on the
           local disk. When uploading a file to the camera, specify the
           filename to store the uploaded file as on the camera.

           The --filename option accepts %a, %A, %b, %B, %d, %H, %k, %I, %l,
           %j, %m, %M, %S, %y, %%, (see date(1)) and, in addition, %n for the
           number, %C for the filename suffix, %f for the filename without
           suffix, %: for the complete filename in lowercase.

           Note that %: is still in alpha stage, and the actual character or
           syntax may still be changed. E.g. it might be possible to use %#f
           and %#C for lower case versions, and %^f and %^C for upper case

           %n is the only conversion specifier to accept a padding character
           and width: %03n will pad with zeros to width 3 (e.g. print the
           number 7 as “007”). Leaving out the padding character (e.g. %3n)
           will use an implementation specific default padding character which
           may or may not be suitable for use in file names.

           Default value for this option can be specified in the
           ~/.gphoto/settings file as gphoto2=filename=value.

       --usbid USBIDS
           (Expert only) Override USB IDs.
            USBIDSmust be of the form
           to treat any USB device detected as
           DetectedVendorID:DetectedProductID as
           TreatAsVendorID:TreatAsProductID instead. All the VendorIDs and
           ProductIDs should be hexadecimal numbers beginning in C notation,
           i.e. beginning with ’0x’.

           Example: --usbid 0x4a9:0x306b=0x4a9:0x306c

       -a, --abilities
           Display camera abilities.

       -f, --folder FOLDER
           Specify camera folder (default="/").

       -R, --recurse
           Recursion (default for download).

           No recursion (default for deletion).

       -l, --list-folders
           List folders in folder.

       -L, --list-files
           List files in folder.

       -m, --mkdir NAME
           Create a directory.

       -r, --rmdir NAME
           Remove a directory.

       -n, --num-files
           Display number of files.

       -p, --get-file RANGE
           Get files given in range.

       -P, --get-all-files
           Get all files from folder.

       -t, --get-thumbnail RANGE
           Get thumbnails given in range.

       -T, --get-all-thumbnails
           Get all thumbnails from folder.

       --get-raw-data RANGE
           Get raw data given in range.

           Get all raw data from folder.

       --get-audio-data RANGE
           Get audio data given in range.

           Get all audio data from folder.

           Overwrite files without asking.

           Only get not already downloaded files. This option depends on
           camera support of flagging already downloaded images and is not
           available for all drivers.

       -d, --delete-file RANGE
           Delete files given in range.

       -D, --delete-all-files
           Delete all files in folder.

       -u, --upload-file FILENAME
           Upload a file to camera.

           Capture a quick preview.

       -F COUNT, --frames COUNT
           Number of frames to capture in one run. Default is infinite number
           of frames.

       -I SECONDS, --interval SECONDS
           Time between capture of multiple frames.

           (Since 2.4) If SIGUSR1 signal is received, a picture is taken
           immediately without waiting for the end of the current interval
           period (see the section called “SIGNALS”). A value of -1 will let
           gphoto2 wait forever, i.e. until a signal arrives. See also
           --reset-interval (since 2.4).

       --reset-interval (since 2.4)
           Setting this option will reset the time interval to the value given
           by the -I|--interval option when a SIGUSR1 signal is received in
           time-lapse mode.

           Capture an image.

           Capture a movie.

           Capture an audio clip.

           Lets gphoto2 wait for notifications from the camera that an object
           was added. This is useful for tethered capture, where pressing the
           shutter on the camera immediately transfer the image to the machine
           for processing.

           Together with the --hook-script to immediately postprocess or
           display the images this can help a studio workflow.

           This option requires support in the driver and by the camera,
           currently only Nikon DSC are known to work.

       --show-info RANGE
           Show info.

           List all configuration entries.

       --get-config CONFIGENTRY
           Get the specified configuration entry.

           This command will list the type, the current value and also the
           available options of this configuration value.

           Set the specified configuration entry.

           Look at the output of --get-config to see what values are possible
           to set here.

           Display information about the camera’s storage media.

           Summary of camera status.

           Camera driver manual.

           About the camera driver.

           Start the gphoto2 shell, an interactive environment. See SHELL
           MODEfor a detailed description.


       The following commands are available:

           Change to a directory on the camera.

           List the contents of the current directory on the camera.

           Change to a directory on the local machine.

           Download the file to the current directory.

           Download the thumbnail to the current directory.

           Download raw data to the current directory.

           Show information.

           Delete a file or directory.

           Show EXIF information (only if compiled with EXIF support).

       help, ?
           Displays command usage.

       exit, quit, q
           Exit the gphoto2 shell.


           If set, defines the directory where the libgphoto2 library looks
           for its camera drivers (camlibs). You only need to set this on OS/2
           systems and broken/test installations.

           If set, defines the directory where the libgphoto2_port library
           looks for its I/O drivers (iolibs). You only need to set this on
           OS/2 systems and broken/test installations.

           Set this to all to receive lots of debug information regarding
           library loading on ld based systems.

           If set, defines the numeric debug level with which the libusb
           library will print messages. In order to get some debug output, set
           it to 1.


       SIGUSR1 (since 2.4)
           In time-lapse capture mode, receiving a SIGUSR1 signal makes
           gphoto2 take a picture immediately.

           If the --reset-interval option is given, the time counter is reset
           to the value given by the -I|--interval option. Note that the
           camera will need some time (from 50ms to a few seconds) to actually
           capture the image.


       libgphoto2(3), The gPhoto2 Manual[1],

       The website[2], Digital Camera Support for UNIX, Linux and


       gphoto2 --list-ports
           Shows what kinds of ports (USB and serial) you have.

       gphoto2 --auto-detect
           Shows what camera(s) you have connected.

       gphoto2 --list-files
           List files on camera.

       gphoto2 --get-file 7-13
           Get files number 7 through 13 from the list output by gphoto2

       gphoto2 --capture-image --interval 60 --hook-script
           Capture one image every 60 seconds from now to eternity. The
           example hook script will be called after each captured image has
           been stored on the computer.

       To track down errors, you can add the --debug parameter to the gphoto2
       command line and, if dealing with USB problems, setting the environment
       variable USB_DEBUG=1.


       Tim Waugh

       Hans Ulrich Niedermann, current maintainer <>

       Michael J. Rensing

       Miscellanous Contributors.

       The gPhoto2 Team

       Tim Waugh <>
           Original man page author.

       Hans Ulrich Niedermann <>
           Current man page editor.


        1. The gPhoto2 Manual

        2. The website

        3. Digital Camera Support for UNIX, Linux and BSD

                   <pubdate>2006-12-21</pubdate>August 2006