From owner-freebsd-questions Fri Jul 26 16:54:40 2002 Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EDF0737B400 for ; Fri, 26 Jul 2002 16:54:33 -0700 (PDT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28E2843E65 for ; Fri, 26 Jul 2002 16:54:33 -0700 (PDT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.6+Sun/8.11.6) id g6QNsQ121028; Fri, 26 Jul 2002 19:54:26 -0400 (EDT) From: Jerry McAllister Message-Id: <200207262354.g6QNsQ121028@clunix.cl.msu.edu> Subject: Re: Tar and RM To: raiden@shell.core.com (Steven Lake) Date: Fri, 26 Jul 2002 19:54:26 -0400 (EDT) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: from "Steven Lake" at Jul 26, 2002 06:25:26 PM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG > > Hi all. Two quick questions. > > 1. I want to tell Tar to just grab a single directory and all the > directories and files below it and keep the atributes, permissions, > path's, etc intact. I've read the man file, but its not making much > sence. Just a simple tar will do: tar cf /some/place/with/room/mydir.tar /usr/local/dir_to_tar Will tar up everything in /usr/local/dir_to_tar and make a tarfile called mydir.tar in /some/place/with/room/ All file names will have full paths within your current when you untar them later as in /usr/local/dir_to_tar/coolpic.jpg If you don't want it to have all the directory structure on the file names in the tar file, then cd closer to the directory. cd /usr/local tar cf /some/place/with/room/mydir.tar dir_to_tar Will do it with file names relative only to dir_to_tar as in ./dir_to_tar/coolpic.jpg cd /usr/local/dir_to_tar tar cd /some/place/with/room/mydir.tar * will make the tar file with names relative to current directory where-ever that is when you do the untar. as in ./coolpic.tar I will let someone else respond to #2 below. ////jerry > 2. I was looking around for ways to trim some fat one one of our > machine and I have a question. I saw the X11R6 directory under /usr and I > was wonder if it's ok to kill that since we don't have and don't want > Xwindows or anything but basic console access to the machine? > > Also, is there any other directories in the /usr slice that I can > ditch or RM in order to snag some extra space? Thanks. > > > To Unsubscribe: send mail to majordomo@FreeBSD.org > with "unsubscribe freebsd-questions" in the body of the message > To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message