MacOS – Mac – How to copy Documents directory to a USB stick

macosterminal

I'm trying to copy the entire Documents folder from a Mac to an external USB drive using the terminal. I'm using the Terminal because the machine will not load any users (it just shows Other) and the Documents directory is the only thing I need before reinstalling.

I've called the USB drive "USB" and formatted it properly as Mac OS Extended (Journaled)

When I try:

cp -R Documents /usb

It returns the entire list of everything that needs copying with: "No such file or directory" on the end.

For example

usb/Pics: No such file or directory

The first two lines when I run the CP command are

/usb: Read only file system
Unable to copy extended attributes to /usb: Read-only file system

So that's probably the problem, but it lets me create directories on the USB through the terminal, which would suggest it's not read only?

Anyhow, I'm lost, and would appreciate any help.

Best Answer

Connected external storages are mounted under /Volumes directory under the root directory. Try running the following command:

cp -R Documents /Volumes/USB

where, USB is the name for the mounted external drive.

-R flag would cause the entire Documents directory hierarchy to be copied.