niallo32
asked on
How can I compress a number of files to a .tar.gz file using cygwin
I need to compress a number of files in XP into a .tar.gz file
Can anyone explain the steps to do so using cygwin?
Thanks
Can anyone explain the steps to do so using cygwin?
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
You can also create compressed archives using the z switch as such:
tar -cvzf /cygwin/c/Documents and Settings/user/compressed.t ar.gz /cygwin/c/path
to create an compressed archive.
then to reopn the archive you can use:
tar xvzf /cygwin/c/Documents and Settings/user/compressed.t ar.gz
GNU tar will remove the beginning "/" during decompress so it will ope the archive relative to the current path. So if you want to restore /cygwin/c/path to the same folder then you need to be at /cygwin/c or otherwise files will be restore relative to current path. Not the root itself.
Cheers,
K.
tar -cvzf /cygwin/c/Documents and Settings/user/compressed.t
to create an compressed archive.
then to reopn the archive you can use:
tar xvzf /cygwin/c/Documents and Settings/user/compressed.t
GNU tar will remove the beginning "/" during decompress so it will ope the archive relative to the current path. So if you want to restore /cygwin/c/path to the same folder then you need to be at /cygwin/c or otherwise files will be restore relative to current path. Not the root itself.
Cheers,
K.
2. the command is like:
tar -zcf c:/your-archive-file-name.