gphoto2 allows you to directly connect a digital camera over USB and transfer the saved images and videos to your computer. This is very helpful when you don’t have access to a media card reader.
Install the gphoto2 package on your system.
In Gentoo:
# emerge media-gfx/gphoto2
In Ubuntu:
# aptitude install gphoto2
Start off by connecting your digital camera to your computer with a USB cable and turning on any transfer/playback mode that might exist.
Run the following command to see if your camera is auto-detected by gphoto2. It will show you the camera model that detected and what port it is on.
$ gphoto2 --auto-detect
This will show you all the files that are currently stored on your camera including images and videos. You will get data such as type, size, and location on the camera device.
$ gphoto2 --list-files
Change your current working directory to the location that you want the images saved on your system.
$ cd ~/camera_images/
Now you can download all the images and videos from your camera to your current working directory on your system.
$ gphoto2 --get-all-files
Once all images are downloaded to your computer you can clear the camera. Make sure your images are stored on your system correctly because there is no going back.
$ gphoto2 --delete-all-files