Date: Fri, 26 Jul 2002 19:54:26 -0400 (EDT) From: Jerry McAllister <jerrymc@clunix.cl.msu.edu> To: raiden@shell.core.com (Steven Lake) Cc: freebsd-questions@FreeBSD.ORG Subject: Re: Tar and RM Message-ID: <200207262354.g6QNsQ121028@clunix.cl.msu.edu> In-Reply-To: <Pine.GSO.4.44L0.0207261819300.19912-100000@shell.core.com> from "Steven Lake" at Jul 26, 2002 06:25:26 PM
next in thread | previous in thread | raw e-mail | index | archive | help
> > 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200207262354.g6QNsQ121028>