LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   Change of suffix format on "split" tar archive files (https://www.linuxquestions.org/questions/linux-software-2/change-of-suffix-format-on-split-tar-archive-files-915302/)

scramble64 11-24-2011 05:20 AM

Change of suffix format on "split" tar archive files
 
Hello all,

I recently used the command below with the intent to back up about 1TB of data into an external HD:

tar -cvpj 'directory/name'/ | split -d -b 2000m - /name/of/archive.tar.bz2.

which produced a list of files named:
archive.tar.bz2.00
archive.tar.bz2.01
...
archive.tar.bz2.99

Now that I am trying to access this data I am realizing that the numbering of the chunks goes from 00 to 99, which got me thinking that actually not all of the original data may have been backed up, given that the suffix for the split files contains only 2 digits and can reach at most a value of "99".

Is there a way to change the format of the suffix to contain more than two digits?

Many thanks for your help!

Carlo

colucix 11-24-2011 05:28 AM

Yes. Try option -a of split
Code:

-a, --suffix-length=N
      use suffixes of length N (default 2)


scramble64 11-24-2011 05:41 AM

Thanks a lot! How did I not see that?!?! :)


All times are GMT -5. The time now is 11:30 PM.