Ubuntu server16.04 copy folder from mounted usb to home folder
Hello all,
I have ssh into my ubuntu server and mounted a usb drive, what I would like to do is copy the folder nzedb to my home directory on this server. my attempts so far have resulted in an error message cannot stat no such directory. sudo cp /dev/sdb1/nzedb ~/ [sudo] password for greg: cp: cannot stat '/dev/sdb1/nzedb': Not a directory Any help will be greatly appreciated Thank you |
you need to mount the device first, you can't pull it directly from the raw block device.
So say... Code:
mkdir /mnt/usb Code:
umount /mnt/usb |
|
Thank you r3sistance
I had to use the -r command then it worked perfect, I've been beating my head on the floor for a while on this and you have been a great help. sudo cp /mnt/usb/nzedb ~/ cp: omitting directory '/mnt/usb/nzedb' greg@nzedb:~$ sudo cp -r /mnt/usb/nzedb ~/ greg@nzedb:~$ ls nzedb |
All times are GMT -5. The time now is 01:33 PM. |