From owner-freebsd-questions@FreeBSD.ORG Wed May 19 15:50:51 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7B4106566B for ; Wed, 19 May 2010 15:50:51 +0000 (UTC) (envelope-from martin@dc.cis.okstate.edu) Received: from dc.cis.okstate.edu (dc.cis.okstate.edu [139.78.103.93]) by mx1.freebsd.org (Postfix) with ESMTP id 0BCA68FC0A for ; Wed, 19 May 2010 15:50:50 +0000 (UTC) Received: from dc.cis.okstate.edu (localhost.cis.okstate.edu [127.0.0.1]) by dc.cis.okstate.edu (8.14.2/8.13.8) with ESMTP id o4JFocl7064558 for ; Wed, 19 May 2010 10:50:43 -0500 (CDT) (envelope-from martin@dc.cis.okstate.edu) Message-Id: <201005191550.o4JFocl7064558@dc.cis.okstate.edu> To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <64556.1274284238.1@dc.cis.okstate.edu> Date: Wed, 19 May 2010 10:50:38 -0500 From: Martin McCormick Subject: tar and --include X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 May 2010 15:50:51 -0000 A few days ago, I asked about the --include directive in tar after things didn't quite work the way the man page seemed to indicate. One might get the impression that if --include or --include='*pattern*' was added to a tar command, tar would only archive what was in the pattern and not archive everything as its default operation. What I discovered was that --include doesn't appear to do anything at all. The example in the man page shows using it to filter an existing archive and make a tar file of what was in the existing archive that also matched the pattern. I never tried that since that is not what was needed here. What turned out to work very well was to use the feature in tar that lets one exclude a whole list of patterns in a designated file. You just put in what shouldn't be in the archive and it appeared to work fine. The --include directive only seems to exist in the FreeBSD form of tar. I tried a Linux system's tar man page and it is not there but both support the -X path/filename for a list of exclusion patterns. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group