Plug in the device
lsblk
to find the device name of your usb device. Naming is /dev/sdXY
. Where X is any english letter and Y is integer, typically 1.
If the device was mounted, you will see the mountpoint, for example:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sdb 8:0 1 15.2G 0 disk
└─sdb1 8:1 1 15.2G 0 part /media/me/4C45-110F
If not, mount it. Follow to the step #3
udisksctl mount -b /dev/sdXY
, device name same as in previous step. (/dev/sdb1
in my example) The mount folder will be reported back to you to use in the next step. For example, suppose lsblk
tells me this:
sdc 8:32 1 7.5G 0 disk
└─sdc1 8:33 1 7.5G 0 part
Then I will do the following:
$ udisksctl mount -b /dev/sdc1
Mounted /dev/sdc1 at /media/xieerqi/A669-34EF.
You can see it automatically created /media/xieerqi/A669-34EF
folder and mounted my pen drive there. Also , big advantage is that you do not need sudo
.
Use rsync
or cp
or mv
to get your files to the folder reported in step 3. Consult manual pages on usage of these commands. cp
and mv
are simplest. mv FILE DESTINATION
- in my example
(where FILE is the thing you want to move to the drive)
mv FILE /media/me/4C45-110F
rsync
is the best for backup however.
For example, to backup TESTDIR
to my usb drive, I can do this:
$ rsync -av /home/xieerqi/TESTDIR/ /media/xieerqi/A669-34EF/~
sending incremental file list
created directory /media/xieerqi/A669-34EF/~
./
file1
file2
file3
sent 228 bytes received 125 bytes 706.00 bytes/sec
total size is 0 speedup is 0.00
udisksctl unmount -b /dev/sdXY
. Remove the device
Example
$ udisksctl unmount -b /dev/sdc1
Unmounted /dev/sdc1.
NOTE: some drives mount to directories that have names with spaces. If you run rsync
or mv
with not quoted names like that, your data will not be copied to correct destination. Always quote pathnames that have spaces in them.
Best Answer
This is due to FAT32 limitation. Files larger than 4GB cannot be stored on a FAT32 volume. Formatting the flash drive as exFAT or NTFS will resolve this issue.
WARNING: Back up your data. Formatting will delete all the data on your device.