Linux-Noob Forums
create tarball from input list - Printable Version

+- Linux-Noob Forums (https://www.linux-noob.com/forums)
+-- Forum: Linux Noob (https://www.linux-noob.com/forums/forum-3.html)
+--- Forum: How Do I? (https://www.linux-noob.com/forums/forum-60.html)
+--- Thread: create tarball from input list (/thread-548.html)



create tarball from input list - albytrott - 2009-11-24


Hello all, noob here :-)

 

I am looking at creating a tar archive using a file list to specify the files to archive, I have looked through the man page and searched the internet and I can't find anything. Any ideas how I can do this?

 

Many thanks

 

Stephen




create tarball from input list - Dungeon-Dave - 2009-11-27


I believe the "-T" option allows you can specify a file containing a list of source objects:

 

tar -vf /tmp/archive.tar -T /tmp/file.list

 

Will that do?

 

Alternatively, script something that works through each file and uses the "-A" option to append to the .tar file.