Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to Tar File

Status
Not open for further replies.

saw15

Technical User
Jan 24, 2001
468
US
I have a set of files I need to compress, but here are the issues:

Using compress, I cannot unzip them on windows.

gzip is not available.

How can I tar? tar -c filename? Getting a message that this the device is not ready.

Help is appreciated.
 
Hi saweens,
As I understand you need to tar a set of files into a tar file on your Hard-Disk. If you have 2 files. lets say /home/saweens/.profile and /home/saweens/.sh_history then

1) Using Absolute Paths
$ tar -cvf tar_file_name.tar /home/saweens/.profile /home/saweens/.sh_history

2) Using Relative Paths
$ cd /home/saweens
$ tar_file_name.tar .profile .sh_history

The distinction between the Absolute and Relative Paths is that when you untar a file created with Absolute Paths, it will untar files to their absolute path no matter where you run the untar command from whereas you untar a file created with Relative Path, it will untar taking the present working directory as the base path.

Hope it helps.
 
Saweens, tar doesn't compress files, so if you need to compress the files because of their size to get them to your desktop tar won't help you.

The later versions of WinZip can uncompress files that were compressed on a Unix system. Just be sure to use the binary mode when ftp'ing from your unix system to your desktop.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top