gefuchs@goedel.uucp (Gill E. Fuchs) (06/30/89)
hello net, suppose i want to tar an entire accound into a tar file named GUGU.tar then i type (at the ~ directory) tar cvf GUGU.tar . but after sometime tar tars GUGU.tar recorsively upon itself, now i have tried all kinds of combinations with the X option for tar but to no avail, i guess i cannot milk the correct command out of the man pages help? thank you gill
maart@cs.vu.nl (Maarten Litmaath) (06/30/89)
gefuchs@goedel.uucp (Gill E. Fuchs) writes:
\suppose i want to tar an entire accound into a tar file named
\GUGU.tar
\
\then i type (at the ~ directory)
\ tar cvf GUGU.tar .
\
\but after sometime tar tars GUGU.tar recorsively upon itself,
\now i have tried all kinds of combinations with the X option for
\tar but to no avail, i guess i cannot milk the correct command out of
\the man pages
The man pages are somewhat unclear indeed.
Commands:
$ cat > excluded
./excluded
./GUGU.tar
$ tar cvfX GUGU.tar excluded .
or
$ tar cvXf excluded GUGU.tar .
Conclusively: the first file is for the first option (that needs a file)
and so on.
--
"I HATE arbitrary limits, especially when |Maarten Litmaath @ VU Amsterdam:
they're small." (Stephen Savitzky) |maart@cs.vu.nl, mcvax!botter!maart
wnp@killer.DALLAS.TX.US (Wolf Paul) (07/01/89)
In article <1731@cmx.npac.syr.edu> gefuchs@logiclab.cis.syr.edu (Gill E. Fuchs) writes: >suppose i want to tar an entire accound into a tar file named >GUGU.tar > >then i type (at the ~ directory) > tar cvf GUGU.tar . > >but after sometime tar tars GUGU.tar recorsively upon itself, >now i have tried all kinds of combinations with the X option for >tar but to no avail, i guess i cannot milk the correct command out of >the man pages Note Maarten Litmath's follow-up for correct 'X' option syntax. If all else fails, i.e. if using the 'X' option doesn't work with your version of tar, try this: tar cvf /tmp/GUGU.tar . or wherever you (a) can find some space and (b) have write permission. You can still 'mv' the tar file back into GUGU's $HOME afterwards.
jonathan@cs.keele.ac.uk (Jonathan Knight) (07/01/89)
From article <2822@solo10.cs.vu.nl>, by maart@cs.vu.nl (Maarten Litmaath): X> gefuchs@goedel.uucp (Gill E. Fuchs) writes: X> \suppose i want to tar an entire accound into a tar file named X> \GUGU.tar X> \then i type (at the ~ directory) X> \ tar cvf GUGU.tar . X> \ > \but after sometime tar tars GUGU.tar recorsively upon itself, > $ cat > excluded > ./excluded > ./GUGU.tar > $ tar cvfX GUGU.tar excluded . Overkill. $ tar -cvpf /usr/tmp/GUGU.tar . will do what was required. The problem is to make sure the tar file is not created in a place that tar is going to find when it is archiving. -- ______ JANET :jonathan@uk.ac.keele.cs Jonathan Knight, / BITNET:jonathan%cs.kl.ac.uk@ukacrl Department of Computer Science / _ __ other :jonathan@cs.keele.ac.uk University of Keele, Keele, (_/ (_) / / UUCP :...!ukc!kl-cs!jonathan Staffordshire. ST5 5BG. U.K.
samlb@magellan.arc.nasa.gov (Samuel B. Bassett) (07/02/89)
Simple: cd ~ mkdir tmp cd tmp tar cvf GUGU.tar .. mv GUGU.tar <wherever> cd .. rmdir tmp Actually, the last parameter (directory to archive) can be anything -- you could say: cd ~ tar cvf bin.tar /bin and it would happily tar the contents of /bin into your directory (presuming, of course, that your quota is big enough). :-) So you expected TFM to be in English, and useful? Nu? :-) Sam'l Bassett, Sterling Software @ NASA Ames Research Center, Moffett Field CA 94035 Work: (415) 694-4792; Home: (415) 454-7282 samlb%well@lll-crg.ARPA samlb@pioneer.arc.nasa.gov <Standard Disclaimer> := 'Sterling doesn't _have_ opinions -- much less NASA!'
bbausch@hpbbse.HP.COM (Bernd Bausch) (07/04/89)
> > suppose i want to tar an entire accound into a tar file named > GUGU.tar > > then i type (at the ~ directory) > tar cvf GUGU.tar . > > but after sometime tar tars GUGU.tar recorsively upon itself, > now i have tried all kinds of combinations with the X option for > tar but to no avail, i guess i cannot milk the correct command out of > the man pages > If there is no filename starting with "." in ~, do tar cvf .GUGU.tar *. If there is no filename starting with "Y" in ~, do tar cvf YGUGU.tar [!Y]* and so on... Bernd.
bph@buengc.BU.EDU (Blair P. Houghton) (07/04/89)
>gefuchs@goedel.uucp (Gill E. Fuchs) writes: >>I type (at the ~ directory) >> tar cvf GUGU.tar . >>but after sometime tar tars GUGU.tar recorsively upon itself, In article <762@lilink.UUCP> mikej@lilink.UUCP (Michael R. Johnston) writes: > tar cvf /tmp/GUGO.tar . However, there is at least one system I work on that does not maintain enough temporary space so that I can tar all my stuff into it (and recently it ran out of space in my home partition, so I'm stuck real good... for the nonce :-) The simple solution is (in csh): rm -f GUGU.tar tar cvf GUGU.tar ./{.??*,*} The shell performs filename expansion before tar(1) is run by the shell, and therefore before GUGU.tar is created. You might be tempted to go into a subdirectory of your own and use "~/{.??*,*}" instead of "./{.??*,*}", but then you are not excluding the parent directory of GUGU.tar from the list of files tar'red, and you end up with the partially[1] recursive problem. [1] "partially", because only that part of GUGU.tar which is complete when tar(1) gets to that name will actually be read. Actually, if your tar(1) supports the "exclusion" (-X) option, use it. At least one that I use doesn't. --Blair "Yeah, that's the ticket."
larry@macom1.UUCP (Larry Taborek) (07/05/89)
From article <1731@cmx.npac.syr.edu>, by gefuchs@goedel.uucp (Gill E. Fuchs): > hello net, > > suppose i want to tar an entire accound into a tar file named > GUGU.tar > > then i type (at the ~ directory) > tar cvf GUGU.tar . > > but after sometime tar tars GUGU.tar recorsively upon itself, > now i have tried all kinds of combinations with the X option for > tar but to no avail, i guess i cannot milk the correct command out of > the man pages > > help? > Gill, Start your tars on the directory level ABOVE the directory you wish to copy. IE: you have a directory /usr/GUNU you cd /usr tar -cvf GUNU.tar GUNU Now the directory GUNU and all below it will be put into the file GUNU.tar. As the file GUNU.tar is not in the path of the backup, it will not create you any problems. -- Larry Taborek ..!uunet!grebyn!macom1!larry Centel Federal Systems larry@macom1.UUCP 11400 Commerce Park Drive Reston, VA 22091-1506 703-758-7000
thoyt@ddn-wms.arpa (Thomas Hoyt) (07/06/89)
>From: "Gill E. Fuchs" <gefuchs@goedel.uucp> >Subject: tar help >suppose i want to tar an entire accound into a tar file named >GUGU.tar Try this: Move to the directory above the directory you want to archive. Type: tar cvf - ./foo > GUGU.tar where foo is the name of the directory you want to archive. The "-" tells tar to put the archival output to stdout, not some tape drive. Good Luck. ****** thoyt@ddn-wms.arpa | "Oh no...it's written in COBOL..." | (Ps. 83:18, KJV) Thomas Hoyt | "Government Computers for Government business..." Network Mgmt, Inc., Fairfax, VA -- 703-359-9400 | "NO FUN ALLOWED..." ******
mikej@lilink.UUCP (Michael R. Johnston) (08/08/89)
gefuchs@goedel.uucp (Gill E. Fuchs) writes: >suppose i want to tar an entire accound into a tar file named >GUGU.tar >then i type (at the ~ directory) > tar cvf GUGU.tar . >but after sometime tar tars GUGU.tar recorsively upon itself, I have had this problem as well. The solution is of course that you are saying "Tar every file in this directory". GUGO.tar happens to be one of them. To get around this I usually do like so: tar cvf /tmp/GUGO.tar . And that takes care of the problem.