Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I came across this shell script that can be used to split an entire directory across multiple compressed files.

I am interested in making a minor tweak to this script. Lets say I have n GB of files in a directory. I do not want the contents of a particular folder to be split across multiple tar files but inside the same file. I want the n MB folder to be fit within a single compressed file and the remaining (n GB -n MB) split across multiple files.

I am not sure whether it is possible with this script. I was looking forward to some suggestions. Though the script has been well documented, it is quite complex to understand for me

share|improve this question
1  
Perhaps you could use a strategy that involves handling the special cases you mentioned separately and then running the script on the rest of the files. This would take the form of some type of filter in the shell script to ignore 'special case' folders and should be a minor change to `emit_dir_parts*. –  Alex Hirzel Jun 25 '12 at 19:28
    
Thanks it helped :) –  Sai Jun 27 '12 at 2:32
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.