Christopher Sawtell wrote:
>On Tuesday 07 March 2006 12:31, chris bayley wrote: > > >>Hi team.... >> >>I have been whipping up a wee bash script to empty out the photos of my >>digital camera to my storage device. >> >> > >You can mount some cameras as USB storage devices, thus making their memory >to appear as if its a standard drive. > > Not so my Canon cameras, though I get good results with ghpoto2(cvs) and the PTP protocol. (Are all canons PTP only ?) >[ ... ] > >Don't forget that cp has a --force option which makes it silent, ie it >changes the mode from 400 to 644 provided you own the file, but it seems >that it doesn't change it back. For shutting it up completely you can >always redirect the stderr o/p to /dev/null > > the cp was only by way of example, but in fact I am currently using the --force-overwrite option of gphoto to the same effect. I guess I will keep using it like this until I overwrite something I wanted or I did myself out of my scripting tangle. >Also the test command allow you test all manor of details about files, >and whether a previous command succeeded. Many unix systems ( used to ) >link /usr/bin/test to /usr/bin/[ but it seems my current Linux distro >doesn't > >cp --help >man cp >man test > >The advanced bash scripting guide:- >http://personal.riverusers.com/~thegrendel/abs-guide-3.7.tar.bz2 >( not terribly 'advanced' actually ) > > but it's not bad all the same, also 'Unix Power Tools'(http://www.unix.org.ua/orelly/unix/upt/index.htm) has some real handy tricks in it! ChrisB ; )
