Re: only backup selected files

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On Sun, Nov 9, 2008 at 4:49 AM, Robert <kerplop@xxxxxxxxxxxxx> wrote:
> I'm sure there will be other ideas but in the absence of an "include these
> files" file option, you could employ a simple loop to append the files in a

man tar:
       -T, --files-from F
              get names to extract or create from file F

> list to a tar archive.  For example, if you had a file named "include" with
> these 3 records
>
>   /bin/gawk
>   /etc/fstab
>   /etc/resolv.conf
>
> This would cause the 3 files to be archived as "included.tar".
> [rj@mavis ~]$ while read inc ; do echo "including:" $inc ; tar -v -r $inc -f
>  included.tar ; done < include

or: tar -jvrc included.tar.bz2 --files-from include

BR Bent
_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos

[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux