Answer» I need to uncompress hundreds of files that are two directories deep (ex: store/storenum/filename.Z). Is there a command to do this or does it need to be scripted? If scripted, what's the best way to do it? It's been over 8 years since I've touched a UNIX box but apparently I'm the one that's supposed to sort this out... HELP!!cd to the relevant directory, then do: find . -name '*.Z' -EXEC unzip '{}' ';'Use -iname instead of -name for a case insensitive search (i.e. to match *.z too).
This is recursive - all .Z files below the starting directory will be found. They will be uncompressed into the current directory however. If you wish to create a new folder somewhere to uncompress the files into, that will be a little more complicated. The basic principle is the same though.The files were compressed using the COMPRESS command.. I can't use unzip or gunzip. Er... you're welcome...
Replace "unzip" with "uncompress". (Assuming you have compress/uncompress installed on your system.)Thank you for your replies!! It WORKED great EXCEPT for what you warned me of (all files were put in the wrong directory). I figured out how to do it so that the files remained in their proper directories...
I never thought I'd have to remember this STUFF again!! Thanks again for your help!!You're welcome - glad it's all sorted.
Unix is like riding a bike really...
|