I am trying to copy a 6GB file, but it won't copy.

share|improve this question
6  
Is the USB drive formatted with FAT32? That file system does not support files larger than 4GB. You have to format it differently then, e.g. as NTFS. Beware that formatting deletes all data on the drive. – Byte Commander 18 hours ago
1  
ok thnz it is work – VJ Ranga 17 hours ago
up vote 28 down vote accepted

This is due to FAT32 limitation. Files larger than 4GB can NOT be stored on a FAT32 volume. Formatting the flash drive as exFAT or NTFS will resolve this issue.

WARNING: Backup your data. Formatting will delete all the data in your device.

share|improve this answer
    
ok thnz it is work : ) – VJ Ranga 17 hours ago

If you don't want to reformat your USB drive you can split your big file into parts, e.g. for your case:

split -b 4G /path/to/input.file /path/to/pen/drive/output.file.

This will create the following files:

4,0G output.file.aa
1,6G output.file.ab

The filesize of output.file.aa matches exactly the maximum file size of your FAT32 formatted USB drive, which is 4 Gibibyte (GiB, that's not the same as Gigabyte GB). See man split for the full documentation.


Before you can access the file you need to merge it first. On Linux system you can do so with:

cat output.file.* > input.file

The corresponding command on Windows systems is:

copy /b output.file.aa+output.file.ab input.file

Along with many other useful GNU utilities, split can be installed in Windows too, see GNU utilities for Win32.

share|improve this answer
2  
splitprovides a useful workaround :-) – sudodus 16 hours ago

Linux only

If you intend to use the drive only with Ubuntu (and other linux distros), it is a good idea to use a linux file system, for example ext4. This way you might get higher read/write speed (depending on which process is the bottleneck), and you will get higher flexibility concerning ownership and permissions.

  • You can use the GUI program gparted to create the ext4 file system.

Full compatibility with Linux, Windows and MacOS

Windows has problems with linux file systems, and I think MacOS has problems with NTFS. So if you want 'full compatibility' for reading and writing, only FAT32 and UDF remain.

  • UDF lacks tools to repair the file system.
  • FAT32 has a 4GB limit for file size.

This link describes how to create and use UDF,

Using the UDF as a successor of FAT for USB sticks

Windows

So if you want full read/write access from Ubuntu and Windows, I would suggest that you use NTFS. (It is possible to use exFAT with some special tools, but I recommend NTFS.)

  • You can use the GUI program gparted to create an NTFS file system.
  • In Windows it is easy to create an NTFS file system too.

MacOS

In MacOS it is possible to use FAT32 and UDF.

You can also use ext4 with a workaround, Ubuntu Server with an SSH server in a virtual machine. (I think the same workaround would work also with Windows.) This may be worthwhile when you intend to access a lot of files via the drive and its file system, but maybe not with a small USB2 pendrive.

See this link,

Using ext4 on OS X Yosemite, the long but safe way

share|improve this answer
2  
AFAIR Windows XP can't write to UDF volumes. It's not much of a problem nowadays but still worth noting, just in case. – gronostaj 15 hours ago
2  
macOS mounts everything as read-only NTFS by default (I presume Apple don't believe the NTFS write support is sufficiently reliable.) – gsnedders 6 hours ago
1  
@gsnedders I expect they just don't believe in Windows. – wizzwizz4 3 hours ago
    
@wizzwizz4, You may be right ;-) But there are several reports about problems/risks with writing from non-windows operating systems to NTFS. For this reason, if you have a dual boot Ubuntu + Windows system, you are recommended to use a separate data partition with NTFS instead of writing directly from Ubuntu to the Windows system partition (C: in Windows). – sudodus 3 hours ago
2  
@sudodus Personally I've had no problems with everything from heavy NTFS partition management to manipulating Streams from Debian, but I appreciate being safe with data. Also, I have a backup, so it doesn't matter if I lose old data (I can just copy it from the backup). – wizzwizz4 3 hours ago

Having had a simular issue and unwilling to reformat the USB stick, I just used an archiver. More or less all modern GUIs (such as File Roller, 7Zip, etc.) or CLIs allow for splitting the archive file. Set the split limit below the FAT boundary (that somewhat 4GB), for speed you can choose a low compression rate, even "store", i.e. do not compress at all, an voila!

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.