Extract Multiple tar files
I would like to extract multiple tar files using one command.
How can I do that?
Mateusz
tar -xvf *.tar
tar -xvf *.tar
find . -name '*.tar' -exec tar -xvf {} \;
I'm so used to passing multiple files to tools on the command-line, I didn't even stop to think that one wouldn't work with multiples.
A caution on Jeff's find command- If the directory with the tar files has no sub dirs then this is great, but if for example the tar files are at root (/) then this command will search the whole system (including mounts) looking for, then extracting tar files.
find . -name '*.tar' -maxdepth 1 -exec tar -xvf {} \;
find *.tar -exec tar xvf '{}' ';'
Extract Multiple tar files