How can I extract files from a .tar.gz archive while keeping a trace of the extracted files?
For example, let's say I have the following file structure...
ROOT ╠═▶ children ║ ╠═▶ joe.txt ║ ╚═▶ george.txt ╠═▶ bar.txt ╠═▶ foo.txt ╚═▶ A̲R̲C̲H̲I̲V̲E̲.t̲a̲r̲.b̲z̲ ├─▷ children │ ├─▷ joe.txt │ └─▷ bob.txt ├─▷ hello.txt ├─▷ world.txt └─▷ foo.txt
Now, if I extract the files from the archive while keeping the newer files in place I'd like to know which ones have been extracted so I can do something like this:
tar xf ./ARCHIVE.tar.gz --keep-newer-files | xargs -I EXTRACTED_FILE echo EXTRACTED_FILE