printf 'n Log-%02d.tar\n' {2..}|tar cf /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/OUTPUT/Log-01.tar -ML1900m /var/opt/sw/e4/data/dev/e4_dev/DEVL3/EW/EWD1/DATA/AED/Temp
I tried to use the above code to tar 1000 files whose file size (varies) greater than 2 GB, which needs to be archived as 1.9 GB separate TAR files.
For example, if there are 1500 files of size 7 GB, it needs to be archived as (7 GB/1.9 GB) 4 tar files: log-01.tar, ..., log-04.tar
but I got the error:
printf: {2..} expected numeric value
tar: -ML1900m: No such file or directory
What should I change here? Is there a way to do this without using create volume method in GNU tar?
{2..}
instead of{2..4}
as written in the previous answer? – Freddy Feb 17 at 20:36