It is currently Thu May 24, 2018 2:09 am

scan hd script

All times are UTC - 6 hours

Post new topic Reply to topic  [ 2 posts ] 
Author Message
 PostPosted: Sun Aug 23, 2009 8:56 pm   

Joined: Sat Aug 22, 2009 2:28 am
Posts: 1
How do I check which mount point a portable harddisk using the ID ? is there a way do this in bash shell script
I know I can find the harddisk using their vendor product id like this "lsusb -d [vendor:product]"
can i find the harddisk mount point using the vendor product id ?

It's for backing up purpose the ftp is not my option because internet so slow and we need to backup 10 more gigs
so I will bring a portable usb Harddisk plug it in in the server
and on plug in the server will check that this is the harddisk for backup or not ( using vendor product id that define in the sh script )
if it's different than do not backup, but if it's the same
copy the data from server to harddisk ( here i need to know where's the mount point otherwise how do i copy it over ? )
and umount the partition on finish copying the file

I'm still newbie here and I only manage to find the lsusb -d, the rest kind of blank.....

 PostPosted: Mon Aug 24, 2009 1:32 am   

Joined: Mon Nov 17, 2008 7:25 am
Posts: 221
Well the device name shouldn't change unless you forcefully remove it, meaning you don't umount it.

Otherwise it should assume the same device name (eg. /dev/sdb and /dev/sdb1).
An fstab entry can make sure that it mounts properly.

(I don't have a linux box close by so can't check what the output of lsusb -d is so if my above solution isn't any good i'll check on it when i have time)

Best regards
Fredrik Eriksson

Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 2 posts ] 

All times are UTC - 6 hours

Who is online

Users browsing this forum: No registered users and 9 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  

BashScripts | Promote Your Page Too
Powered by phpBB © 2011 phpBB Group