LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-28-2016, 03:12 PM   #1
eco_bach
Member
 
Registered: Dec 2016
Posts: 230

Rep: Reputation: Disabled
gphoto2- basic syntax for deleting file from command line


Hi
having some problems simply trying to delete files using gphoto2 from an MTP-PTP device.

http://gphoto.org/doc/manual/ref-gphoto2-cli.html

In my case the file number is 1 and I issue

Code:
gphoto2 -d 1
which returns the following error
Quote:
*** Error ***
There are no files in folder '/'.
*** Error (-2: 'Bad parameters') ***
 
Old 12-28-2016, 03:14 PM   #2
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Escape or Quote the 1,.. maybe \1 or '1' or "1" or "\1"
 
Old 12-29-2016, 12:17 PM   #3
eco_bach
Member
 
Registered: Dec 2016
Posts: 230

Original Poster
Rep: Reputation: Disabled
Nope
Perhaps am interpreting the help incorrectly? http://linuxcommand.org/man_pages/gphoto21.html

Usage: gphoto2 [-?qvalLnPTDR] [-?|--help] [--usage] [--debug]
[--debug-loglevel=STRING] [--debug-logfile=FILENAME] [-q|--quiet]
[--hook-script=FILENAME] [--stdout] [--stdout-size] [--auto-detect]
[--show-exif=STRING] [--show-info=STRING] [--summary] [--manual]
[--about] [--storage-info] [--shell] [-v|--version]
[--list-cameras] [--list-ports] [-a|--abilities] [--port=FILENAME]
[--speed=SPEED] [--camera=MODEL] [--usbid=USBIDs] [--list-config]
[--list-all-config] [--get-config=STRING] [--set-config=STRING]
[--set-config-index=STRING] [--set-config-value=STRING] [--reset]
[--keep] [--keep-raw] [--no-keep]
[--wait-event=COUNT, SECONDS, MILLISECONDS or MATCHSTRING]
[--wait-event-and-download=COUNT, SECONDS, MILLISECONDS or MATCHSTRING]
[--capture-preview] [--show-preview] [-B|--bulb=SECONDS]
[-F|--frames=COUNT] [-I|--interval=SECONDS] [--reset-interval]
[--capture-image] [--trigger-capture] [--capture-image-and-download]
[--capture-movie=COUNT or SECONDS] [--capture-sound]
[--capture-tethered=COUNT, SECONDS, MILLISECONDS or MATCHSTRING]
[--trigger-capture] [-l|--list-folders] [-L|--list-files]
[-m|--mkdir=DIRNAME] [-r|--rmdir=DIRNAME] [-n|--num-files]
[-p|--get-file=RANGE] [-P|--get-all-files] [-t|--get-thumbnail=RANGE]
[-T|--get-all-thumbnails] [--get-metadata=RANGE] [--get-all-metadata]
[--upload-metadata=STRING] [--get-raw-data=RANGE]
[--get-all-raw-data] [--get-audio-data=RANGE] [--get-all-audio-data]
[-d|--delete-file=RANGE] [-D|--delete-all-files]
[-u|--upload-file=FILENAME] [--filename=FILENAME_PATTERN]
[-f|--folder=FOLDER] [-R|--recurse] [--no-recurse] [--new]
[--force-overwrite] [--skip-existing]

Last edited by eco_bach; 12-29-2016 at 12:24 PM.
 
Old 12-29-2016, 01:20 PM   #4
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Rethinking my post.. Didnt realize the numbers lined up with a filename.. thats why RANGE is in the help there.

Try this and post results:

Code:
gphoto2 --debug --list-files
gphoto2 --debug --delete-file=1

Last edited by szboardstretcher; 12-29-2016 at 01:26 PM.
 
Old 12-29-2016, 01:41 PM   #5
eco_bach
Member
 
Registered: Dec 2016
Posts: 230

Original Poster
Rep: Reputation: Disabled
Thanks
I think what is supposed to work is something like

Code:
sudo gphoto2 -d 1-1 --folder=<folder path here in quotes>
Unfortunately I keep getting an error
Quote:
PTP read only
 
Old 12-29-2016, 01:44 PM   #6
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
add a --debug to the command and post the results as requested previously. Hopefully there is more to go on.

also provide the output of 'mount' and advise which mount point is your camera.

also try to cd to the camera directory you are trying to delete the file from and do a 'touch TESTFILE' and post the outcome.

Last edited by szboardstretcher; 12-29-2016 at 01:45 PM.
 
Old 12-29-2016, 03:24 PM   #7
eco_bach
Member
 
Registered: Dec 2016
Posts: 230

Original Poster
Rep: Reputation: Disabled
Hey thanks for your help. Much appreciated!
Anyways first
The output of any --debug commands are quite verbose and long and I'm only allowed 30000 characters. I'm running ubuntu-mate off a live usb.

The file I am trying to delete is SAM_0008.MP4 which is located in /store_00020002/DCIM/100PHOTO)


When I try
Code:
gphoto2 --debug --list-files
Quote:
0.149793 gp_port_write (3): Wrote 16 = 0x10 bytes to port: (hexdump of 16 bytes)
0000 10 00 00 00 01 00 08 10-0c 00 00 00 05 00 00 00 ................

0.149800 ptp_usb_getdata (2): Reading PTP_OC 0x1008 (Get object info) data...
0.149803 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.150049 gp_port_read (3): Read 162 = 0xa2 out of 1024 bytes from port: (hexdump of 162 bytes)
0000 a2 00 00 00 02 00 08 10-0c 00 00 00 02 00 02 00 ................
0010 82 b9 00 00 f6 7d 14 05-00 00 00 00 00 00 00 00 .....}..........
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0030 00 00 03 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040 0d 53 00 41 00 4d 00 5f-00 30 00 30 00 30 00 38 .S.A.M._.0.0.0.8
0050 00 2e 00 4d 00 50 00 34-00 00 00 11 32 00 30 00 ...M.P.4....2.0.
0060 31 00 36 00 30 00 31 00-30 00 32 00 54 00 30 00 1.6.0.1.0.2.T.0.
0070 30 00 33 00 34 00 34 00-30 00 2e 00 00 00 11 32 0.3.4.4.0......2
0080 00 30 00 31 00 36 00 30-00 31 00 30 00 32 00 54 .0.1.6.0.1.0.2.T
0090 00 30 00 30 00 33 00 34-00 34 00 30 00 2e 00 00 .0.0.3.4.4.0....
00a0 00 00 - ..

0.150066 ptp_usb_getresp (2): Reading PTP_OC 0x1008 (Get object info) response...
0.150070 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.150168 gp_port_read (3): Read 12 = 0xc out of 1024 bytes from port: (hexdump of 12 bytes)
0000 0c 00 00 00 03 00 01 20-0c 00 00 00 ....... ....

0.150188 debug_objectinfo (2): ObjectInfo for 'SAM_0008.MP4':
0.150192 debug_objectinfo (2): Object ID: 0x00000005
0.150195 debug_objectinfo (2): StorageID: 0x00020002
0.150198 debug_objectinfo (2): ObjectFormat: 0xb982
0.150201 debug_objectinfo (2): ProtectionStatus: 0x0000
0.175081 debug_objectinfo (2): ObjectCompressedSize: 85229046
0.175090 debug_objectinfo (2): ThumbFormat: 0x0000
0.175092 debug_objectinfo (2): ThumbCompressedSize: 0
0.175095 debug_objectinfo (2): ThumbPixWidth: 0
0.175097 debug_objectinfo (2): ThumbPixHeight: 0
0.175099 debug_objectinfo (2): ImagePixWidth: 0
0.175101 debug_objectinfo (2): ImagePixHeight: 0
0.175105 debug_objectinfo (2): ImageBitDepth: 0
0.175107 debug_objectinfo (2): ParentObject: 0x00000003
0.175111 debug_objectinfo (2): AssociationType: 0x0000
0.175115 debug_objectinfo (2): AssociationDesc: 0x00000000
0.175118 debug_objectinfo (2): SequenceNumber: 0x00000000
0.175122 debug_objectinfo (2): ModificationDate: 0x56871b20
0.175125 debug_objectinfo (2): CaptureDate: 0x56871b20
0.175132 debug_objectinfo (2): ObjectInfo for 'SAM_0008.MP4':
0.175136 debug_objectinfo (2): Object ID: 0x00000005
0.175139 debug_objectinfo (2): StorageID: 0x00020002
0.175142 debug_objectinfo (2): ObjectFormat: 0xb982
0.175145 debug_objectinfo (2): ProtectionStatus: 0x0000
0.175148 debug_objectinfo (2): ObjectCompressedSize: 85229046
0.175151 debug_objectinfo (2): ThumbFormat: 0x0000
0.175154 debug_objectinfo (2): ThumbCompressedSize: 0
0.175156 debug_objectinfo (2): ThumbPixWidth: 0
0.175159 debug_objectinfo (2): ThumbPixHeight: 0
0.175162 debug_objectinfo (2): ImagePixWidth: 0
0.175165 debug_objectinfo (2): ImagePixHeight: 0
0.175168 debug_objectinfo (2): ImageBitDepth: 0
0.175170 debug_objectinfo (2): ParentObject: 0x00000003
0.175173 debug_objectinfo (2): AssociationType: 0x0000
0.175176 debug_objectinfo (2): AssociationDesc: 0x00000000
0.175179 debug_objectinfo (2): SequenceNumber: 0x00000000
0.175182 debug_objectinfo (2): ModificationDate: 0x56871b20
0.175185 debug_objectinfo (2): CaptureDate: 0x56871b20
0.175189 gp_filesystem_list_files (2): Added 'SAM_0008.MP4'
0.175192 internal_append (2): Internal append SAM_0008.MP4 to folder 100PHOTO
0.175196 gp_filesystem_list_files (2): Listed 'SAM_0008.MP4'
There is 1 file in folder '/store_00020002/DCIM/100PHOTO'.
0.175207 gp_camera_file_get_info (2): Getting file info for 'SAM_0008.MP4' in '/store_00020002/DCIM/100PHOTO'...
0.175212 gp_filesystem_get_info (2): Getting information about 'SAM_0008.MP4' in '/store_00020002/DCIM/100PHOTO'...
0.175216 lookup_folder_file (2): Lookup folder /store_00020002/DCIM/100PHOTO file SAM_0008.MP4
0.175219 lookup_folder (2): Lookup folder '/store_00020002/DCIM/100PHOTO'...
0.175224 ptp_list_folder (2): (storage=0x00020002, handle=0x00000000)
0.175228 ptp_list_folder (2): (storage=0x00020002, handle=0x00000001)
0.175232 ptp_list_folder (2): (storage=0x00020002, handle=0x00000003)
0.175236 strcpy_mime (2): Failed to find mime type for 0000
#1 SAM_0008.MP4 rd 83232 KB video/mp4
0.175250 gp_camera_folder_list_folders(2): Listing folders in '/store_00020002/DCIM/100PHOTO'...
0.175253 gp_filesystem_list_folders (2): Listing folders in /store_00020002/DCIM/100PHOTO
0.175257 lookup_folder (2): Lookup folder '/store_00020002/DCIM/100PHOTO'...
0.175260 gp_filesystem_list_folders (2): ... is dirty, getting from camera
0.175263 folder_list_func (2): folder_list_func(/store_00020002/DCIM/100PHOTO)
0.175267 ptp_list_folder (2): (storage=0x00020002, handle=0x00000000)
0.175270 ptp_list_folder (2): (storage=0x00020002, handle=0x00000001)
0.175273 ptp_list_folder (2): (storage=0x00020002, handle=0x00000003)
0.175276 folder_list_func (2): after list folder
0.175280 delete_all_folders (2): Internally deleting all folders from '/store_00020002/DCIM/100PHOTO'...
0.175284 lookup_folder (2): Lookup folder '/store_00020002/DCIM/100PHOTO'...
0.175287 recurse_delete_folder (2): Recurse delete folder 0x55bb012218d0/100PHOTO
0.175291 gp_filesystem_list_folders (2): Folder /store_00020002/DCIM/100PHOTO contains 0 subfolders.
0.175296 foreach (2): Executing action 'List Files' for folder '/store_00020002/DCIM/Camera'.
0.175300 gp_camera_folder_list_files (2): Listing files in '/store_00020002/DCIM/Camera'...
0.175303 gp_filesystem_list_files (2): Listing files in /store_00020002/DCIM/Camera
0.175306 lookup_folder (2): Lookup folder '/store_00020002/DCIM/Camera'...
0.175309 gp_filesystem_list_files (2): Querying folder /store_00020002/DCIM/Camera...
0.175313 delete_all_files (2): Delete all files in folder 0x55bb01221900/Camera
0.175316 file_list_func (2): file_list_func(/store_00020002/DCIM/Camera)
0.175320 ptp_list_folder (2): (storage=0x00020002, handle=0x00000000)
0.175323 ptp_list_folder (2): (storage=0x00020002, handle=0x00000001)
0.175327 ptp_list_folder (2): (storage=0x00020002, handle=0x00000004)
0.175330 debug_objectinfo (2): ObjectInfo for 'Camera':
0.175333 debug_objectinfo (2): Object ID: 0x00000004
0.175336 debug_objectinfo (2): StorageID: 0x00020002
0.175339 debug_objectinfo (2): ObjectFormat: 0x3001
0.175341 debug_objectinfo (2): ProtectionStatus: 0x0000
0.175344 debug_objectinfo (2): ObjectCompressedSize: 0
0.175347 debug_objectinfo (2): ThumbFormat: 0x0000
0.175350 debug_objectinfo (2): ThumbCompressedSize: 0
0.175353 debug_objectinfo (2): ThumbPixWidth: 0
0.175355 debug_objectinfo (2): ThumbPixHeight: 0
0.175358 debug_objectinfo (2): ImagePixWidth: 0
0.175361 debug_objectinfo (2): ImagePixHeight: 0
0.175364 debug_objectinfo (2): ImageBitDepth: 0
0.175367 debug_objectinfo (2): ParentObject: 0x00000001
0.175370 debug_objectinfo (2): AssociationType: 0x0001
0.175373 debug_objectinfo (2): AssociationDesc: 0x00000000
0.175376 debug_objectinfo (2): SequenceNumber: 0x00000000
0.175379 debug_objectinfo (2): ModificationDate: 0x585bcf34
0.175382 debug_objectinfo (2): CaptureDate: 0x585bcf34
0.175385 ptp_list_folder (2): Listing ...
0.175390 ptp_usb_sendreq (2): Sending PTP_OC 0x1007 (Get object handles) request...
0.175394 gp_port_write (3): Writing 24 = 0x18 bytes to port...
0.175580 gp_port_write (3): Wrote 24 = 0x18 bytes to port: (hexdump of 24 bytes)
0000 18 00 00 00 01 00 07 10-0d 00 00 00 02 00 02 00 ................
0010 00 00 00 00 04 00 00 00- ........

0.175597 ptp_usb_getdata (2): Reading PTP_OC 0x1007 (Get object handles) data...
0.175603 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.175670 gp_port_read (3): Read 20 = 0x14 out of 1024 bytes from port: (hexdump of 20 bytes)
0000 14 00 00 00 02 00 07 10-0d 00 00 00 01 00 00 00 ................
0010 06 00 00 00 - ....

0.175683 ptp_usb_getresp (2): Reading PTP_OC 0x1007 (Get object handles) response...
0.175687 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.175792 gp_port_read (3): Read 12 = 0xc out of 1024 bytes from port: (hexdump of 12 bytes)
0000 0c 00 00 00 03 00 01 20-0d 00 00 00 ....... ....

0.179594 ptp_list_folder (2): adding new objectid 0x00000006 (nrofobs=5,j=5)
0.179601 ptp_list_folder (2): parenthandle 0x00000004
0.179604 ptp_list_folder (2): storage 0x00020002
0.179608 file_list_func (2): after list folder
0.179619 ptp_usb_sendreq (2): Sending PTP_OC 0x1008 (Get object info) request...
0.179624 gp_port_write (3): Writing 16 = 0x10 bytes to port...
0.179673 gp_port_write (3): Wrote 16 = 0x10 bytes to port: (hexdump of 16 bytes)
0000 10 00 00 00 01 00 08 10-0e 00 00 00 06 00 00 00 ................

0.179680 ptp_usb_getdata (2): Reading PTP_OC 0x1008 (Get object info) data...
0.179683 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.180051 gp_port_read (3): Read 176 = 0xb0 out of 1024 bytes from port: (hexdump of 176 bytes)
0000 b0 00 00 00 02 00 08 10-0e 00 00 00 02 00 02 00 ................
0010 01 38 00 00 26 6d 09 00-00 00 00 00 00 00 00 00 .8..&m..........
0020 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0030 00 00 04 00 00 00 00 00-00 00 00 00 00 00 00 00 ................
0040 14 32 00 30 00 31 00 36-00 31 00 32 00 32 00 32 .2.0.1.6.1.2.2.2
0050 00 5f 00 31 00 33 00 30-00 33 00 34 00 38 00 2e ._.1.3.0.3.4.8..
0060 00 6a 00 70 00 67 00 00-00 11 32 00 30 00 31 00 .j.p.g....2.0.1.
0070 36 00 31 00 32 00 32 00-32 00 54 00 31 00 33 00 6.1.2.2.2.T.1.3.
0080 30 00 33 00 34 00 38 00-2e 00 00 00 11 32 00 30 0.3.4.8......2.0
0090 00 31 00 36 00 31 00 32-00 32 00 32 00 54 00 31 .1.6.1.2.2.2.T.1
00a0 00 33 00 30 00 33 00 34-00 38 00 2e 00 00 00 00 .3.0.3.4.8......

0.180085 ptp_usb_getresp (2): Reading PTP_OC 0x1008 (Get object info) response...
0.180090 gp_port_read (3): Reading 1024 = 0x400 bytes from port...
0.180213 gp_port_read (3): Read 12 = 0xc out of 1024 bytes from port: (hexdump of 12 bytes)
0000 0c 00 00 00 03 00 01 20-0e 00 00 00 ....... ....

<deleted characters referencing jpg because of text length>
....... ....

0.211345 gp_port_close (2): Closing port...
0.212417 _close_async_interrupts (2): canceling transfer 0:0x55bb011f2188 (status 0)
0.214587 _close_async_interrupts (2): canceling transfer 1:0x55bb011e87a8 (status 0)
0.216764 _close_async_interrupts (2): canceling transfer 2:0x55bb011e89b8 (status 0)
0.218941 _close_async_interrupts (2): canceling transfer 3:0x55bb012141a8 (status 0)
0.221123 _close_async_interrupts (2): canceling transfer 4:0x55bb0120ba98 (status 0)
0.223291 _close_async_interrupts (2): canceling transfer 5:0x55bb0120bce8 (status 0)
0.225449 _close_async_interrupts (2): canceling transfer 6:0x55bb011eb618 (status 0)
0.227617 _close_async_interrupts (2): canceling transfer 7:0x55bb0120c248 (status 0)
0.229794 _close_async_interrupts (2): canceling transfer 8:0x55bb0120c498 (status 0)
0.231972 _close_async_interrupts (2): canceling transfer 9:0x55bb011e7858 (status 0)
0.234152 _close_async_interrupts (2): checking: transfer 0:0x55bb011f2188 status 0
0.234175 _close_async_interrupts (2): checking: transfer 1:0x55bb011e87a8 status 0
0.234178 _close_async_interrupts (2): checking: transfer 2:0x55bb011e89b8 status 0
0.234181 _close_async_interrupts (2): checking: transfer 3:0x55bb012141a8 status 0
0.234184 _close_async_interrupts (2): checking: transfer 4:0x55bb0120ba98 status 0
0.234186 _close_async_interrupts (2): checking: transfer 5:0x55bb0120bce8 status 0
0.234188 _close_async_interrupts (2): checking: transfer 6:0x55bb011eb618 status 0
0.236336 _close_async_interrupts (2): checking: transfer 7:0x55bb0120c248 status 0
0.236348 _close_async_interrupts (2): checking: transfer 8:0x55bb0120c498 status 0
0.236355 _close_async_interrupts (2): checking: transfer 9:0x55bb011e7858 status 0
0.236375 _cb_irq (2): 0x55bb011f2188 with status 3
0.236382 _cb_irq (2): 0x55bb011e87a8 with status 3
0.236386 _cb_irq (2): 0x55bb011e89b8 with status 3
0.236389 _cb_irq (2): 0x55bb012141a8 with status 3
0.236392 _cb_irq (2): 0x55bb0120ba98 with status 3
0.236396 _cb_irq (2): 0x55bb0120bce8 with status 3
0.236399 _cb_irq (2): 0x55bb011eb618 with status 3
0.236402 _cb_irq (2): 0x55bb0120c248 with status 3
0.236405 _cb_irq (2): 0x55bb0120c498 with status 3
0.236410 _cb_irq (2): 0x55bb011e7858 with status 3
0.236570 gp_filesystem_reset (2): resetting filesystem
0.236576 gp_filesystem_lru_clear (2): Clearing fscache LRU list...
0.236579 gp_filesystem_lru_clear (2): fscache LRU list already empty
0.236581 delete_all_folders (2): Internally deleting all folders from '/'...
0.236583 lookup_folder (2): Lookup folder '/'...
0.236586 lookup_folder (2): Found! / is 0x55bb011bf3e0
0.236588 recurse_delete_folder (2): Recurse delete folder 0x55bb011bf3e0//
0.236591 recurse_delete_folder (2): Recurse delete folder 0x55bb01213bc0/store_00020002
0.236593 recurse_delete_folder (2): Recurse delete folder 0x55bb011e6fc0/SYSTEM
0.236595 delete_folder (2): Delete one folder 0x55bb011e6fc0/SYSTEM
0.236598 delete_all_files (2): Delete all files in folder 0x55bb011e6fc0/SYSTEM
0.236601 recurse_delete_folder (2): Recurse delete folder 0x55bb011e6dc0/DCIM
0.236606 recurse_delete_folder (2): Recurse delete folder 0x55bb01221900/Camera
0.236609 delete_folder (2): Delete one folder 0x55bb01221900/Camera
0.236613 delete_all_files (2): Delete all files in folder 0x55bb01221900/Camera
0.236615 recurse_delete_folder (2): Recurse delete folder 0x55bb012218d0/100PHOTO
0.236618 delete_folder (2): Delete one folder 0x55bb012218d0/100PHOTO
0.236622 delete_all_files (2): Delete all files in folder 0x55bb012218d0/100PHOTO
0.236624 delete_folder (2): Delete one folder 0x55bb011e6dc0/DCIM
0.236628 delete_all_files (2): Delete all files in folder 0x55bb011e6dc0/DCIM
0.236631 delete_folder (2): Delete one folder 0x55bb01213bc0/store_00020002
0.236634 delete_all_files (2): Delete all files in folder 0x55bb01213bc0/store_00020002
0.236637 gp_port_free (2): Freeing port...
0.236640 gp_port_close (2): Closing port...
0.236801 gp_filesystem_reset (2): resetting filesystem
0.236811 gp_filesystem_lru_clear (2): Clearing fscache LRU list...
0.236815 gp_filesystem_lru_clear (2): fscache LRU list already empty
0.236818 delete_all_folders (2): Internally deleting all folders from '/'...
0.236822 lookup_folder (2): Lookup folder '/'...
0.236825 lookup_folder (2): Found! / is 0x55bb011bf3e0
0.236829 recurse_delete_folder (2): Recurse delete folder 0x55bb011bf3e0//

Last edited by eco_bach; 12-29-2016 at 03:28 PM.
 
Old 12-29-2016, 03:31 PM   #8
eco_bach
Member
 
Registered: Dec 2016
Posts: 230

Original Poster
Rep: Reputation: Disabled
Also, you can't consistently cd to a file on a MTP device because the mount point changes constantly

See
http://unix.stackexchange.com/questi...gh-bash/311863

if I
Code:
cd /run/user/999/gvfs
I see the mount point
Quote:
mtp:host=%5Busb%3A002%2C028%5D
then I
Code:
cd mtp:host=%5Busb%3A002%2C028%5D
and ls which gives me
Quote:
Card
then
Code:
ls
Quote:
DCIM System
then
Code:
cd DCIM/100Photo
and finally see the file!
SAM_0008.MP4

Code:
touch SAM_0008.MP4
Quote:
touch: cannot touch 'SAM_0008.MP4': Operation not supported
And finally, while in the target folder, if I do

Code:
$ sudo rm SAM_0008.MP4
I get
Quote:
rm: cannot remove 'SAM_0008.MP4': Permission denied

Last edited by eco_bach; 12-29-2016 at 03:47 PM.
 
Old 12-30-2016, 03:16 AM   #9
szboardstretcher
Senior Member
 
Registered: Aug 2006
Location: Detroit, MI
Distribution: GNU/Linux systemd
Posts: 4,237

Rep: Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653Reputation: 1653
Ok. But you did a pure 'ls' command which shows nothing of the permissions. Perhaps doing 'ls -alh' and 'stat SAM_0008.MP4' would be more helpful. And I don't see the output of 'mount' either.
 
  


Reply

Tags
delete, gphoto2


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
From the command line What is the syntax syntax to import some data into mysql table Glenn D. Linux - Software 1 03-13-2015 10:26 AM
PHP Parse error: syntax error, unexpected end of file in Command line code on line 1 pizzipie Programming 8 12-11-2014 01:49 PM
[SOLVED] run ps|grep command by script/command line ... ERROR: Unsupported option (BSD syntax) masuch Programming 4 05-23-2012 05:13 AM
Command line syntax - No such file or directory exists Mountaineer Linux - Newbie 11 11-06-2011 04:09 PM
problem deleting file using solaris command line. szehanz Solaris / OpenSolaris 2 03-22-2005 08:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 12:15 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration