Extracting specific files with file extension from a .tar.xz archive using MacOS terminal
问题 I have a number of compressed archives with the extension .tar.xz . I am advised that, when decompressed, the total size required is around 2TB. Within the archives are a number of images that I am solely after. Is there a method to solely extract files for example with the extensions .jpeg, .jpeg and .gif from the compressed archives without having to extract every file? Thanks 回答1: It's trivial to just extract one of the file types; for example: tar -xjf archive.tar.xz '*.jpeg' will extract