CemilCan
Posts: 1
Joined: Sat Nov 03, 2018 10:38 am

i want to copy my Minecraft world from my USB

Sat Nov 03, 2018 10:42 am

Hey guys i want to copy my Minecraft world from my USB to my Raspberry Pi per SSH but it wont work please help.

[email protected]:/mnt $ ls
System Volume Information welt WorldBorder.jar
[email protected]:/mnt $ cp welt /home/pi/minecraft
cp: -r not specified; omitting directory 'welt'
[email protected]:/mnt $

What does that mean?

jbudd
Posts: 877
Joined: Mon Dec 16, 2013 10:23 am

Re: Rasbian Stretch Lite

Sat Nov 03, 2018 4:47 pm

Because welt is a directory, the cp command won't copy it or the files and directories within it unless you use the -r (recursive) option.

cp -r welt /home/pi/minecraft

User avatar
WillBoxOwO
Posts: 116
Joined: Wed Jun 27, 2018 10:24 pm

Re: Rasbian Stretch Lite

Sat Nov 03, 2018 6:55 pm

You should pay more attention to errors that your commands produces. In your log, it clearly said:
CemilCan wrote:
Sat Nov 03, 2018 10:42 am
cp: -r not specified; omitting directory 'welt'
From there, its self explanatory. :mrgreen:
I like cats

k-pi
Posts: 914
Joined: Sun Feb 12, 2017 1:46 pm
Location: Upper Hale, Surrey, UK.

Re: Rasbian Stretch Lite

Sun Nov 04, 2018 11:49 am

Using cp -a is usually preferable, as it will keep all permissions within the directory.

n67
Posts: 938
Joined: Mon Oct 30, 2017 4:55 pm

Re: Rasbian Stretch Lite

Sun Nov 04, 2018 1:35 pm

k-pi wrote:
Sun Nov 04, 2018 11:49 am
Using cp -a is usually preferable, as it will keep all permissions within the directory.
"cp -a" is *usually* preferable, but not in this case.

SInce the USB drive is from the DOS/WIndows world, it doesn't have Unix semantics. As a result, if you copy with -a, you'll get a bunch of (non-fatal) error messages (something about not being able to preserve something or other - I don't have it front of me ATM). It still copies, but you will get these messages.

The alternative (assuming you don't need recursive copying) is to use "-p".

There are, of course, other alternatives...
"L'enfer, c'est les autres"

G fytc hsqr rum umpbq rm qyw rm rfc kmbq md rfgq dmpsk:

Epmu Sn!

J lnacjrw njbruh-carppnanm vxm rb mnuncrwp vh yxbcb!

Return to “Beginners”