thanks a lot for ur info! i am not upto to what you have updated....
i played around and got where the problem is:
I have a dataset file copied in Windows called test_run.sas7bdat and zipped it and transferred to Unix box using WinSCP.
My gunzip is successful but i lost the extension and i am also not able to read this unzipped dataset from SAS EG.
Please advise how to get the dataset normally when i do this kind of gunzip... is there any more option need to be included?
And one more scenario:
I have one more file (which is my friend kept in my work area and not sure what method he used to transfer/load that .zip file to unix box) which is 354258928 Bytes in size and when i perform the same gunzip options i am getting the below error:
Is that size is restricting me or my friend copied in different way which corrupted this zip file?
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
Quote:
Originally Posted by Arunprasad
My gunzip is successful but i lost the extension and i am also not able to read this unzipped dataset from SAS EG.
In a short test I wrote, gunzip did not restore the original extension. You can rename the file with:
the general idea being:
If that allows sas to run, then perhaps we can move on to other questions you have asked ... cheers, drl
the rename worked for me.... sas able to read the dataset without any issues.
The actual .zip file what i have is 337 MB in size then probably it will be more than a GB when unzip the the same (not sure).
And i am not sure why i am not able to perform the below and getting the error.... is this because the file size constraint? and i have enough space in the file system too.
Location: Saint Paul, MN USA / BSD, CentOS, Debian, OS X, Solaris
Posts: 2,288
Thanks Given: 430
Thanked 480 Times in 395 Posts
Hi.
The gunzip command, like most of the *nix commands, does one thing well. In the case of gzip / gunzip, that is compressing / uncompressing files. It does not gather files together like many Windows utilities, zip, winzip, pkzip, etc. In the *nix world, the gathering is done with a separate utility, the most common being tar.
So the usual method of working in *nix is run tar to get a single file of a collection of files, and then, as a separate step, compress that file. The result is often a name that looks like name.tar.gz.
The gunzip command, as a convenience, will uncompress a zip file, but only if it has a single element. The way that gunzip works is to uncompress the file to a temporary file, and (effectively) copy that file back onto the name.zip file, so the original file is essentially replaced. Other utilities allow the name.zip file to remain, and create additional files that were in the archive. Both the commands unzip and 7z work like that.
So if one has a zip archive with more than one element, one needs to:
a) use a command different from gunzip, or
b) re-create the zip archive with single elements.
I quickly wrote a script that illustrates many of the topics we have discussed:
producing:
Best wishes ... cheers, drl
Last edited by drl; 06-07-2010 at 01:43 PM..
Reason: ( edit 1 - minor typos )
in short: gunzip is not unzip. they are not the same command. gunzip is related to zip only by ancestry, for .zip files use unzip. for gz files use gunzip. If you don't have unzip, get it, your OS and distribution is all but guaranteed to have the most ported program on the planet.
Last edited by Corona688; 06-07-2010 at 01:41 PM..
Hi,
I'm trying to run my application on HP-UX server.
I have to extract a *.tar.gz file.
I'm doing that now in 2 steps.
first I gunzip it and then pax it.
My question is how can I check whether the data in the *.tar.gz file is corrupted or not??
Now, I'm trying to do this... (1 Reply)
Hi ALL,
Am working with the gunzip command to zip all the old files having 10 days
am using the command
find . -name '*.log' -type f -mtime +10 -exec gunzip {} \;
am facing two issues
1.)it displays the files which are all older than a year
2.)when am trying to gunzip all the... (2 Replies)
hi
On one of our SCO 5.0.6 server gunzip doesn't work and I'm getting this error message:
# gunzip
dynamic linker: gunzip: symbol not found: ___requires_updated_system_library_se_
Killed
What's missing? (0 Replies)
Hello Everyone,
I have a few files in a directory such as :
abc.xyz.txt1.gz
abc.xyz.txt2.gz
....
....
...
...
abd.xyz.txt100.gz
And I want uncompressed files such as:
abc.xyz.txt1
abc.xyz.txt2
....
...
.....
.... (1 Reply)
I have a zip file as a.zip and it contains 1m xml files. like a1.xml, a2.xml....
The size is also very big nearly 1GB. I want to extract only a123.xml.
Can any one help how can I do this? (1 Reply)
Hi All,
I am using UNIX command to unzip the files
gzip -d9 DW_*.gz
The Xmls are compressed using gzip and it is received in the .gz format at UNIX box which need to be uncompressed.
The above command is working fine for 400 compressed xmls(.gz files) but when the count becomes 401 or more i... (7 Replies)
Hi All,
I am a newbie to unix and need help.
I am trying to unzip the files in source library to destination library.
the input filename can be any thing with abc and after unzip, i want the same file name with original extension
suppose,the input file is ABC_jun25.dat.gz after gunzip in the... (1 Reply)
unzip test.zip ==> This uncompresses and keeps the original zip file.
gunzip test.gz ==> Removes the .gz file after uncompressing.
Is there any switch to make the .gz file available after uncompression.
Thanx in advance. (3 Replies)
Hi
can't unzip a gz file in TurboLinux 7.0
when i'm trying this
gunzip filename.tar.gz it always says not in gzip format
what should I do...please help me (4 Replies)
Hi...........
i have downloaded...sunscreen3.1 lite frm sunfreeware .com and it is in tar.gz format..so i download gzip also...
now pls tell me how to install gzip and how to unzip tht sunscreen tar.gz file..............after unzipping i have to untar the tar file or not.....pls tell me in... (2 Replies)