Section: (1)
Updated: September 2004
Index Return to Main Contents


gphoto2 - command-line gphoto2 client  


gphoto2 [--debug] [-q | --quiet] [-v | --verbose] [-h | --help]

 [--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] | --no-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 | --delete-all-files]

 [-u FILENAME | --upload-file FILENAME] [--config]


 [--get-config CONFIGENTRY]



 [-F COUNT | --frames COUNT] [-I SECONDS | --interval SECONDS] [--capture-image] [--capture-movie] [--capture-sound]

 [--show-info RANGE]

 [--show-exif RANGE]

 [--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.

-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 connected.

--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
Specify the filename to use when saving downloaded files. 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, and %f for the filename without suffix.

%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.

--usbid USBIDS
(Expert only) Override USB IDs. USBIDSmust be of the form DetectedVendorID:DetectedProductID=TreatAsVendorID:TreatAsProductID to treat any USB device detected as DetectedVendorID:DetectedProductID asTreatAsVendorID: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="/").

--filename FILENAME
Specify the filename to use when saving downloaded files. 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, and %f for the filename without suffix.

-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-files 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.

Capture an image.

Capture a movie.

Capture an audio clip.

--show-info RANGE
Show info.

List all configuration entries.

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

Set the specified configuration entry.

Summary of camera status.

Camera driver manual.

About the camera driver.

Start the gphoto2 shell, an interactive environment. See SHELL MODE for 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 libgphoto2 looks for its camera drivers (camlibs).

If set, defines the directory where libgphoto2_port looks for its I/O drivers (camlibs).

If set, defines the numeric libusb debug level with which libusb will print messages.



 libgphoto2(3), The gPhoto2 Manual, 



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 --list-files.



The gPhoto2 Team.
Man page edited by Tim Waugh[ twaugh at redhat dot com ].



AUTHOR manual pages