Mery84 has asked for the wisdom of the Perl Monks concerning the following question:
When I do mount how to check is this operation is successful and files copied to $usbmount are copied to usb stick? If $usbdev isn`t mounted the copy part of script stil works, files are stored on / partition where /media dir is placed.$usbdev = "/dev/sde1/"; $usbmount = "/media/usb/"; system("mount $usbdev $usbmount"); Here should be test
fails - error is returned always no matter is usb stick mounted or not, is it pluged in or not.if (! -e "$usbmount") { print "error \n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: How to verify mount point
by Eliya (Vicar) on Mar 23, 2012 at 15:57 UTC | |
|
Re: How to verify mount point
by Tux (Canon) on Mar 23, 2012 at 16:03 UTC | |
|
Re: How to verify mount point
by moritz (Cardinal) on Mar 23, 2012 at 16:07 UTC | |
|
Re: How to verify mount point
by JavaFan (Canon) on Mar 23, 2012 at 16:24 UTC | |
|
Re: How to verify mount point
by reisinge (Hermit) on Mar 23, 2012 at 19:02 UTC | |
by Mery84 (Novice) on Mar 26, 2012 at 07:55 UTC | |
|
Re: How to verify mount point
by salva (Canon) on Mar 23, 2012 at 22:51 UTC |