0

I have an archive that contains files from various directories (created with -T option, so I used file with list of files to archive). Files preserve owners and rights.

Content is like:

var/lib/prog1/backups/file1.db
var/lib/prog2/file.file
etc/prog3/my.conf

Is it possible to extract each of them to their source directory?

2 Answers 2

0

Without the preceding /, it's a relative path, which means they will extract to the current directory where you run the tar -xf command.

Either run the tar -xf extract command from / or use the -C / option to change to / before extracting. As-always, checkout man tar for details.

-1

OK, found solution myself.

--absolute-names option must be used BOTH when you create archive, as well as when you extract it. Works perfect. THANKS anyway!

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .