The error:
mv: error writing '/mnt/as.zip': File too largemeans that the destination file system (in this case, likely mounted at /mnt/) does not support large files, typically files over 2 GB or 4 GB in size.
Common causes#
- FAT32 file system β has a 4 GB file size limit.
- ext3 (with certain configurations) β may have issues with very large files.
- Filesystem is mounted with size limitations or quotas.
β Solution Options#
π 1. Check the file system type:#
Run:
df -T /mntLook at the Type column β if it’s vfat (FAT32), it has a 4 GB file size limit.
π‘ 2. Solutions:#
β a. Reformat the destination with a large-file-friendly filesystem:#
Use
exFAT, NTFS, ext4, XFS, or Btrfs.# Example for reformatting to exFAT (after backing up data!) sudo mkfs.exfat /dev/sdX1
β b. Compress or split the file before moving:#
Split the file into parts:
split -b 2G as.zip as.zip.part-Then move all parts:
mv as.zip.part-* /mnt/To reassemble later:
cat as.zip.part-* > as.zipβ c. Use a different destination:#
Move the file to a location with an ext4, xfs, or exfat file system.
If youβre not sure about the filesystem or want help formatting safely, feel free to share the output of:
df -T /mnt