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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Unzipping TAR Files

Status
Not open for further replies.

CptTom

Programmer
Jul 16, 2001
117
US
I am having trouble running a TAR command so that I can ftp a smaller file to a Windows platform and unzip with WINZIP.

I was told to run tar -covf /path/filename file1, file2, file3, etc

Doesn't seem to work

Any ideas?

Larry
 
I think the problem is the commas. Use spaces instead between the filenames. Here's an example:

tar -covf /tmp/my.tar file1 file2 file3

This will create a tar file '/tmp/my.tar' containing file1, file2, and file3.

Note that tar also supports wildcards for the file names so you could use 'file*' instead of 'file1 file2 file3'.
 
OK, part 2 of question. I get errors opening the file, something about headers. I have script that creates tables, runs the tar command, then opens another script. The second script runs the ftp commands, I am setting the ftp to asc - ASCII, could this cause the trouble?

Larry
 
When you FTP from Windows always set FTP to binary mode. The other possibility is the tar command. I've never used the -o option of tar. Looking at the man page it says that is writes "a V7 format archive, rather than ANSI format". So you could also try using 'tar cvf'.

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top