Rosa2003
asked on
How to copy directories from Linux to Windows?
Hello,
I want to copy some files from my Linux box (RedHat9.0) to my Windows box (Windows 2003). For that I use Samba.
The files are:
/home/jdoe/mail/*.*
/var/spool/mail/jdoe
I can connect with smbclient from my Linux box to my Windows box
smbclient //MyWindowsServerName/MySh aredCarpet -U administrator -W WORKGROUP
Password:****
smb: \>
Initially, I'm on /root/ carpet, but I don't know how to copy /home/jdoe/mail/*.*
If I do:
smb: \> put /home/jdoe/mail/*.*
I get error: /home/jdoe/mail/*.* does not exist
How can I copy directories and files from another path?
I want to copy some files from my Linux box (RedHat9.0) to my Windows box (Windows 2003). For that I use Samba.
The files are:
/home/jdoe/mail/*.*
/var/spool/mail/jdoe
I can connect with smbclient from my Linux box to my Windows box
smbclient //MyWindowsServerName/MySh
Password:****
smb: \>
Initially, I'm on /root/ carpet, but I don't know how to copy /home/jdoe/mail/*.*
If I do:
smb: \> put /home/jdoe/mail/*.*
I get error: /home/jdoe/mail/*.* does not exist
How can I copy directories and files from another path?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Make sure their is the same username and password setup on both machines which permissions setup on the w2k box for that user
then modify the follow to meet your needs
smbmount //<server/foldermapping> ~/<foldermapping> -o username=<username>,passwo
s,fmask=600,dmask=700
the ~/<foldermapping> simply mounts in my home area, you could of course use the full path
/users/foo/<foldermapping>
then
cp /home/jdoe/mail/*.* ~/<foldermapping>/
cp /var/spool/mail/jdoe ~/<foldermapping>/
once its copied everything across I simpy run
smbumount /users/foo/<foldermapping>
this removes the mount point
I normally script this and then run it through cron so that each day and a set time it does it..
P.S. remember to remove the "<" ">"
I hope this is clear enough?
Gabe