On Sun, 2002-02-17 at 01:32, Jim Kershner wrote: > From the tar manual:
Jim, Thank you very much. This certainly clarifies the solution. In using the -P option, then, would something like # tar cvzfP tarfile.tar.gz files.... be the correct application? Regards, Chuck > --absolute-names > Do not strip leading slashes from file names. > > By default, GNU tar drops a leading `/' on input or output. This option > turns off this behavior; it is equivalent to changing to the root directory > before running tar (except it also turns off the usual warning message). > When tar extracts archive members from an archive, it strips any leading > slashes (`/') from the member name. This causes absolute member names in > the archive to be treated as relative file names. This allows you to have > such members extracted wherever you want, instead of being restricted to > extracting the member in the exact directory named in the archive. For > example, if the archive member has the name `/etc/passwd', tar will extract > it as if the name were really `etc/passwd'. > > Other tar programs do not do this. As a result, if you create an archive > whose member names start with a slash, they will be difficult for other > people with a non-GNU tar program to use. Therefore, GNU tar also strips > leading slashes from member names when putting members into the archive. > For example, if you ask tar to add the file `/bin/ls' to an archive, it > will do so, but the member name will be `bin/ls'. > > If you use the --absolute-names (-P) option, tar will do neither of these > transformations. > To archive or extract files relative to the root directory, specify the > --absolute-names (-P) option. > > Normally, tar acts on files relative to the working directory--ignoring > superior directory names when archiving, and ignoring leading slashes when > extracting. > > When you specify --absolute-names (-P), tar stores file names including all > superior directory names, and preserves leading slashes. If you only > invoked tar from the root directory you would never need the > --absolute-names (-P) option, but using this option may be more convenient > than switching to root. > > Hope this helps! > > At 01:41 AM 2/16/2002, you wrote: > >It will only dump he contents of the tar > >into the current directory > >unless the path of the enclosed files > >are relative to /. > > > > > > > > > > This is a multi-part message in MIME format... > > > > > > ------------=_1013832683-13086-986 > > > Content-Type: text/plain > > > Content-Transfer-Encoding: 7bit > > > > > > I appreciate the advice on how to automate TAR/GZIP. > > > > > > Concerning the matter of restoring, especially something like a full > > > system backup, I am having another problem. > > > > > > When I open up a TAR file, by default it will dump into the directory > > > where the TAR file is located. The problem is, if my my TAR/GZIP file is > > > too large to fit into the /.. partition, I can't do a full restore > > > directly from there. I would have to unpack it in another directory (or > > > perhaps even another drive) and then copy the folders to my original > > > drive individually. > > > > > > Is there a setting that can be applied to TAR to make the restore occur > > > in another drive, or lower-level folder, in other words, with absolute > > > directories, instead of relative? I have read the instructions on TAR in > > > a few different books, and in the HOWTO pages, but these all just > > > explain only the basic packing and unpacking function, and don't give me > > > a clue as to how to solve this problem. > > > > > > Chuck > > > > > > > > > > > > ------------=_1013832683-13086-986 > > > Content-Type: text/plain; name="message.footer" > > > Content-Disposition: inline; filename="message.footer" > > > Content-Transfer-Encoding: 8bit > > > > > > Want to buy your Pack or Services from MandrakeSoft? > > > Go to http://www.mandrakestore.com > > > > > > ------------=_1013832683-13086-986-- > > > > > > > > >Want to buy your Pack or Services from MandrakeSoft? > >Go to http://www.mandrakestore.com >
Want to buy your Pack or Services from MandrakeSoft? Go to http://www.mandrakestore.com