KYkid85
Posts: 18
Joined: Mon Mar 21, 2016 1:51 pm

How to save files to USB

Sun Apr 03, 2016 6:33 pm

How do i save files to the USB drive? I am able to access USB. Just cant figure out how to save them in Terminal?

-thanks

rzusman
Posts: 347
Joined: Fri Jan 01, 2016 10:27 pm

Re: How to save files to USB

Sun Apr 03, 2016 6:48 pm

Assuming the drive is mounted at /media/usb, do a
cp /path/to/file /media/usb/directory_to_put_it_in

If the drive is mounted somewhere else, you will need to change the path.

d.dandurand
Posts: 4
Joined: Sun Apr 03, 2016 6:58 pm

Re: How to save files to USB

Sun Apr 03, 2016 11:54 pm

I was having a problem saving to a usb device as well. My problem ended up being a permissions problem where I was not the "owner" of the drive. If you think this is your problem try this command:

chown username:username /media/Disk

use your user name where it says user name and the name of the media device your looking to change ownership of where it says "Disk"

To check name of media use command:

cd /media/username

again where it says username this is your username.

User avatar
DougieLawson
Posts: 39121
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: How to save files to USB

Mon Apr 04, 2016 7:54 am

chown only works if the USB device is formatted with a Linux filesystem like ext4. If it is FAT, FAT32, exFAT or NTFS the security stops at the mount. Whoever mounted it owns it, default is user=root, group=root (unless it's done with the GUI automounter when it's user=pi, group=pi).
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

Return to “Beginners”