losforword
asked on
Linux Samba Map
I need to mount the windows share in Linux box for file transfer and unmount the share after the file transfer in place in single script
assume that windows share is on h-web0.kiro.sys/myshare
and now the files in Linux system are under /var/www/fedu/hidden/*.sys
assume that windows share is on h-web0.kiro.sys/myshare
and now the files in Linux system are under /var/www/fedu/hidden/*.sys
Provide more details and your requirement
perhaps something like; (untested)
#!/bin/bash
USERID=windowsusername
PASSWORD=windowspassword
LOCALMOUNT=/mnt # change this to mount where you want it locally
mount -t cifs -o username=${USERID},password=${PASSWORD} //h-web0.kiro.sys/myshare ${LOCALMOUNT}
find /var/www/fedu/hidden -name "*.sys" | cpio -puvdm ${LOCALMOUNT}
umount ${LOCALMOUNT}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Answer given: https:#a37282193