|
When you run the script, it will create a subject matter directory. DIRPATH should describe the pictures and is entered at the prompt. If your_script_file_name = getcamJ,(J for getting the pictures with .jpg extensions) the command sequence would look like this:
[bash]$ getcamJ Please enter a directory name for the pictures. bash]$ something Password: [bash]$ your root password |
If you run this script file in superuser mode the rest of this paragraph does not apply. You have to be superuser to run this. Consequently, the 'su' command. The -c flag will let you execute one command and return to your present working directory. The quotation marks allow you to enter more that one command. And the semicolon allows one command to execute right after the last.
/sbin/modprobe usb-storage: modprobe will install the USB mass storage module along with any other modules or drivers needed. Mainly the SCSI driver. Make sure that you have in your /dev directory the following entries. sda0, sda1, sda2, sda3, sda4, sdb0, sdb1, sdb2, sdb3, sdb4. Set sda1 to the appropriate device if you have other SCSI devices mounted, probably sdb1.
Mount your SCSI driver: mount -t vfat /dev/sda1 /mnt/camera
Start your USB: /etc/rc.d/init.d/usb start
Move your pictures from your camera to your hard drive. mv will also remove your pictures from your camera: mv /mnt/camera/dcim/100msdcf/*.jpg picture/$DIRPATH;
Unmount your SCSI driver: umount /mnt/camera
Then: chown -R your_login_name picture/$DIRPATH. When you do something as superuser (su) or root, root owns those files/pictures. Some of the things you may want to do to these files/pictures may give you a permission denied error. This allows the user to work without those errors. Read the manual for more information.
My system is set up with no USB or SCSI compiled into the kernel. All this was compiled as modules. This script file assumes your system is the same. If not, you will have to make some modifications. Please read the manuals and HOWTOs. Or ask on one of the Linux newsgroups.
Hosting by: Hurra Communications Ltd.
Generated: 2007-01-26 17:58:37