LInux挂载windows共享磁盘

 1 #!/bin/sh
 2 #进行windows paths目录同步
 3 cd /mnt
 4 
 5 str="//10.33.4.199/linux"
 6 result=$(df | grep ${str} )
 7 if [[ "$result" != "" ]]
 8 then
 9     echo "/mnt/patches 已成功挂载到//10.33.4.199/linux"
10 else
11     echo "正在进行/mnt/patches挂载//10.33.4.199/linux"
12     mount -t cifs -o username="administrator",password="hxsd@123" //10.33.4.199/linux /mnt/patches
13 fi

 

posted @ 2017-03-02 22:09  YatHo  Views(1503)  Comments(0Edit  收藏  举报