Pages

Tuesday, December 31, 2013

Command to tar multiple sub-folders (Linux)

Hello,

  I am  not a scripting expert but I tried this below 1 line script by adding many parts and it did my work so I  thought of sharing with all.

This script will tar multiple sub-folder base on the number giving by the user in the script.



 #head -num File_with_list.txt | tr '\n' '\0' | tar --null -uf /folder_destination/name.tar -T -


Where,