0

I need to copy all the files and folders from my company's network folder (of another employees) to my virtual machine.

For example

Source: \\ABCCL001569\Code\

Destination: /var/www/html/code_Dump

  1. Is this possible scp? If so how?

  2. Once copied to /var/www/html/code_Dump I need to move the entire list of files and directories to /var/www/html/another_location

6
  • cp, rsync scp... take your pick! Commented Nov 16, 2016 at 12:42
  • i need via scp or rsync.... im trying something like scp \\ABCCL001569\\Code [email protected]:/var/www/html/code_Dump ... i know source path would be meaningless,cause im writing this command in VM and its not accessible to other employees network drive...want a proper command Commented Nov 16, 2016 at 12:46
  • so the VM does not have access to the \\ABCCL001569\Code\ ? Commented Nov 16, 2016 at 12:58
  • What is the remote computer? Windows, OS X, *nix? Commented Nov 16, 2016 at 15:25
  • Remote computer is Windows 7 @Zachary Commented Nov 16, 2016 at 16:07

1 Answer 1

0

You'll want to first mount the share of the windows computer with a command like below.

sudo mount -t cifs -o username=${USER},password=${PASSWORD} //server-address/share /mount/path/on/ubuntu 

So a completed command might look like.

sudo mount -t cifs -o username=MyUsername,password=SecretPassword //ABCCL001569/Code /mnt/cifs 

Then you will can copy and move files all you want via cp or rsync

cp -vr /mount/path/on/ubuntu /var/www/html/code_Dump 
6
  • Ok let me try tat... And what's the username and password.. Of my remote computer? if so how do I get those Commented Nov 16, 2016 at 16:22
  • The username and password are for the share on ABCCL001569. You get them by asking whoever has access to the computer/share. But based on your comment I am guessing you don't know if there is even an available share on the remote computer. Do you have access to the windows computer? Commented Nov 16, 2016 at 16:24
  • Yes I have access to the network folder, copy files from network drive to my computer hard drive...tat code folder was shared to me from another employee... We can copy the files from Windows to windows... Wat I wanted to try was copy those huge size files from tat network folder to my VM ubuntu thru cmd... But no idea if we can get the password for the shared folder Commented Nov 16, 2016 at 16:31
  • So when you access from windows to windows I assume you're using a UNC path or something like that to access ABCCL001569 and it's share for Code. You use the same username and password for that. I also removed the uid=,gid= bit as it was a unnecessary. Commented Nov 16, 2016 at 16:33
  • Ok basically ABCCL001569 is within the organizations domain... Different network for different emp... We do ctrl c ctrl v from tat abc network to our local hard drive... This takes hell lot of time since Windows... So let me see if is it possible to get tat remotes ABCs network password details... Commented Nov 16, 2016 at 16:38

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.