From owner-freebsd-questions@FreeBSD.ORG Thu Aug 30 14:58:16 2007 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 5C20016A417 for ; Thu, 30 Aug 2007 14:58:16 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.188]) by mx1.freebsd.org (Postfix) with ESMTP id E8C6513C480 for ; Thu, 30 Aug 2007 14:58:15 +0000 (UTC) (envelope-from stapleton.41@gmail.com) Received: by nf-out-0910.google.com with SMTP id k4so429881nfd for ; Thu, 30 Aug 2007 07:58:14 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=OJ2wdbEeQBpLTyduBOgUGarx9Wj29gXJ8HppI8kx76/DOm0cL1wZQ1yiknJqcvhYum4BSumfsCcNfGa25MKsBijMmbrhnL8a3nScsnqS7fg//9OW7HOEAQiTm9jgM7u/TZc8Tp/0l9RrcQ4tsMONqjd0hUzyrwhbwFWNZcXIrVk= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=LPN7CrhCtbMDi2Lp5xnAFWVUZSHyqe3tRkEUKSNsKiBkZVOGPrm7mAtglBkC8x+HQV0mUS9UhfNU0nCE0W2PHaHi9yrhgmCnzwLeMRVOBdgBqSopPnkudCwQMStEU4Das5SQO78TDSM+9kr4vRGYRrkf3ow/aerTXRCATadfVqw= Received: by 10.82.181.10 with SMTP id d10mr1290689buf.1188485894249; Thu, 30 Aug 2007 07:58:14 -0700 (PDT) Received: by 10.82.191.14 with HTTP; Thu, 30 Aug 2007 07:58:14 -0700 (PDT) Message-ID: <80f4f2b20708300758v56c71856u1ce737a0a2caff9e@mail.gmail.com> Date: Thu, 30 Aug 2007 10:58:14 -0400 From: "Jim Stapleton" To: freebsd-questions@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Subject: file patterns and tar 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: Thu, 30 Aug 2007 14:58:16 -0000 I want to create a backup of some parts of my system, but not everything ex, I want to exclude /bin, and /usr/bin, but not /usr/local/bin - same for *sbin, *lib, and *libexec however, if I used tar -jcvf test.tbz \ --exclude /bin --exclude /usr/bin \ --exclude /dev --exclude /var --exclude /tmp \ --exclude /root --exclude /proc / | \ tar -tf - | grep bin I don't get /usr/local/bin files. I coudln't find more help in tar, either through tar --help or man tar, though I know it says that it is excluding leading slashes in file names (which is probably causing this issue). What should I do, short of running tars for /, /usr/ and /usr/local, or is that the only real option? But then there is always the possiblility of missing something because its name just happens to contain bin, or more likely contains lib. Thanks, -Jim Stapleton