See
gPhoto - ArchWiki, it is a Linux library to import images from a camera.
# Find Camera
Plug in camera, e.g. canon -> use view mode and connect usb cable and get model:
1
2
3
4
|
❯ gphoto2 --auto-detect
Model Port
----------------------------------------------------------
Canon EOS 40D (PTP mode) usb:003,004
|
# Quick import
# Choose destination
With current date:
1
|
gphoto2 --get-all-files --filename /home/sspaeti/Simon/Sync/Pics/Cam/%y%m%d_IMPORT_CAM/%f
|
in another directory:
1
|
gphoto2 --get-all-files --filename ~/Simon/IMPORT_CAM
|
Import from and to (list) - use list to see images:
1
|
gphoto2 --get-file 570-580 --filename /home/sspaeti/Simon/Sync/Pics/Cam/%y%m%d_IMPORT_CAM/%f
|
# Current directory
1
2
3
4
5
6
7
8
|
~ ❯ gphoto2 --get-all-files
Saving file as IMG_4416.CR2
Saving file as IMG_4416.JPG
Saving file as IMG_4417.CR2
Saving file as IMG_4417.JPG
Saving file as IMG_4418.CR2
Saving file as IMG_4418.JPG
...
|
# List images
1
2
3
4
5
6
7
8
9
10
11
|
~ ❯ gphoto2 --list-files
There is no file in folder '/'.
There is no file in folder '/store_00010001'.
There is no file in folder '/store_00010001/DCIM'.
There are 585 files in folder '/store_00010001/DCIM/100CANON'.
#1 IMG_4416.CR2 rd 12809 KB image/x-canon-cr2 1700948608
#2 IMG_4416.JPG rd 4123 KB image/jpeg 1700948606
#3 IMG_4417.CR2 rd 12474 KB image/x-canon-cr2 1700948608
#4 IMG_4417.JPG rd 4057 KB image/jpeg 1700948608
#5 IMG_4418.CR2 rd 12972 KB image/x-canon-cr2 1700989920
#6 IMG_4418.JPG rd 3618 KB image/jpeg 1700989918
|
# Quick Commands
gphoto2 --list-ports
gphoto2 --auto-detect
gphoto2 --abilities
gphoto2 --summary
gphoto2 --list-files
gphoto2 --get-all-files
gphoto2 --capture-image-and-download
gphoto2 --set-config datetime=now - sets the camera to the current time
For advanced file manipulation, use
Origin: Omarchy