[CentOS] Two queries: samba and usb
Mark LaPierre
marklapier at aol.comSun Dec 1 17:05:05 UTC 2013
- Previous message: [CentOS] 64bit centos and wine
- Next message: [CentOS] Error in 6.5 release notes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 11/29/2013 01:03 AM, Rajagopal Swaminathan wrote:
> Greetings,
>
> I have two distinct queries
>
> 1. How to detect removal of external usb hard disk within a script and
> stop backup?
>
You should know what the path to the external storage is when you have
it mounted. Just check the path to see if the directory exists:
if ( -d "Path to a directory on the mounted volume" ) {
Run Your Backup;
} else {
Take Some Other Action;
}
This is perl script, but the same concept will work with shell script
with slightly different syntax.
--
_
°v°
/(_)\
^ ^ Mark LaPierre
Registered Linux user No #267004
https://linuxcounter.net/
****
- Previous message: [CentOS] 64bit centos and wine
- Next message: [CentOS] Error in 6.5 release notes?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the CentOS mailing list