Nick Lewis <[email protected]> ha escrit: > I have tars that contain files with absolute paths and wish to replace > some of the files. However I do not wish to extract all the files into > the root directory as this will adversely affect operation of my > computer. Therefore I wish to extract the files to a subdirectory, make > the desired replacements and tar it all up again with the > paths appearing as before.
Use the --transform option, e.g.: tar -cf archive.tar --transform s,^,/, * Or, if tarring the entire directory: tar -cf archive.tar --transform s,^\.,, . For a detailed description of that option, refer to http://www.gnu.org/software/tar/manual/html_node/transform.html#IDX380 Regards, Sergey
