Problem with the sudo mount -t and umount -t code

I work and have to save a backup file in three locations besides the main HDD. Instead of having to save the same file four times, I would like to automate the procedure through a linux bash script file in which the first saved file on the HD can be copied simultaneously to an external HDD and to two flash drives.

This requires that the file systems on the external HDD and the two flash drives be mounted as sudo and later be unmounted. The file systems are as follows:

cp /home/user/project (from the source dir) >> To the target dir: /media/Maxtor/user/project
……/media/USB_1/user/project
……/media/USB_2/user/project

I will appreciate your help for the required beginning “sudo mount -t” and ending “sudo umount -t” codes or other openSuse 11.1 system files that may need to be edited so that the script.sh execute properly.


sudo mount -t auto -o noatime /dev/sdXn /media/USB_1
cp ...
sudo umount /media/USB_1

You have to correctly set device name /dev/sdXn

Also, make sure that the USB device contains user writable directory user/project.

-o option reduces the number of writes by not recording the file access time.

Thank you very much for your help.

How can I find the proper device name or the /dev/sdXn information for the external HDD and the two flash drives?

I forgot to mention that my PC has two HDs. Windows Vista is installed on one, and openSuse 11.1 is installed on the other one. Windows Vista appears on SATA 1 while openSuse 11.1 appears on SATA 2.

When I wish to switch from one OS to the other I just enter directly into the BIOS setup utility to change the HD boot order leaving the Windows and the Linux installs untouched.

Use another method than “/dev/sdX”, i.e. UUIDs or disklabels.