Javier Barber
Senior Sysadmin Freelancer
© 2020 All rights reserved.
DIVIDIR UN FICHERO GRANDE EN MUCHOS PEQUEÑOS: split
Con el comando ‘split’ podemos dividir un fichero muy pesado en varios mas pequeños.
Ejemplo: Dividir un fichero de 250 MB en ficheros de 2 MB con el prefijo LF_ en el nombre.
# ls -lh largefile
-rw-r–r– 1 root root 251M Feb 19 10:27 largefile
# split -b 2m largefile LF_
# ls -lh LF_* | head -n 5
-rw-r–r– 1 root root 2.0M Feb 19 10:29 LF_aa
-rw-r–r– 1 root root 2.0M Feb 19 10:29 LF_ab
-rw-r–r– 1 root root 2.0M Feb 19 10:29 LF_ac
-rw-r–r– 1 root root 2.0M Feb 19 10:29 LF_ad
-rw-r–r– 1 root root 2.0M Feb 19 10:29 LF_ae
# ls -lh LF_* | wc -l
126