You'll find the answer to your second question if you google this:
Code:
extract "exe files" linux
The answer lies within the first few entries. In fact, you won't have to follow any of the links. The answer is right there on the google search response page.
(It doesn't involve using
wine, either; it's much simpler.)
The general moral of this story is that you can save yourself some time (and get your answers more quickly) by trying google first. Highly recommended!
dive answered the first question quite well. Here's a demo script I just cooked up:
Code:
#!/bin/sh
rm -rf tmp newplace some_package.tgz
mkdir tmp
mkdir tmp/a
mkdir tmp/a/b
echo "This is the content of slack-required." > tmp/a/b/slack-required
echo "This file represents the rest of the package" > tmp/a/b/other_stuff
echo "This file represents the rest of the package" > tmp/a/other_stuff
echo "This file represents the rest of the package" > tmp/other_stuff
echo "+++ about to make the package"
tar -chvzf some_package.tgz tmp
echo "+++ done making the package"
mkdir newplace
cd newplace
echo "+++ this is the file we wish to restore:"
tar -tzf ../some_package.tgz | grep slack-required
echo "+++ we are now going to restore that file"
tar -xvzf ../some_package.tgz $(tar -tzf ../some_package.tgz | grep slack-required)
echo "+++ done restoring that file"
echo "+++ that file is here (in theory there could be more than one slack-required, and we would find them all):"
find . -name slack-required
echo "+++ that file contains this data (in theory there could be more than one slack-required, and we'd display them all):"
cat $(find . -name slack-required)
echo "+++ this proves that we didn't also restore the other stuff:"
ls -R .
When you run that script, you may wish to pipe the output through
less; it's 30 lines long.
Hope this helps.