LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 04-19-2012, 01:38 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
gunzip unknown suffix -- ignored


hi, i have about 100 gzipped files that are named like vendor-837-12-04-20-14:44:37.253.

i am trying to gunzip all of them but i keep getting errors like:
gunzip: vendor-837-12-04-20-14:44:37.253: unknown suffix -- ignored

when i 'cp vendor-837-12-04-20-14:44:37.253 vendor-837-12-04-20-14:44:37.253.gz; gunzip vendor-837-12-04-20-14:44:37.253.gz' it behaves correctly but i'll get a hand-cramp from doing that more than 100 times.

since unix uses the magic number to know the file-type, isnt the filename irrelevant ?

thanks,
 
Old 04-19-2012, 01:48 PM   #2
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
Hello

My advise is to escape the - and the : characters, so your instruction end like:

Code:
gunzip [OPTIONS] vendor\-837\-12\-04\-20\-14\:44\:37\.253
Other whise the CLI try to interprate the metacharacters

Regards
 
Old 04-19-2012, 01:52 PM   #3
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
^ thanks for the advice but i am having the same problem like so:
gunzip: vendor.837: unknown suffix -- ignored

but gunzip vendor.837.gz works perfectly.

how to make it so gunzip will take any filename (seems kinda' windows-like to expect an extension on every filename) ?
 
Old 04-19-2012, 02:03 PM   #4
repo
LQ 5k Club
 
Registered: May 2001
Location: Belgium
Distribution: Arch
Posts: 8,529

Rep: Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899Reputation: 899
try to use
zcat

Quote:
zcat will uncompress
files that have the correct magic number whether they have a
.gz suffix or not.
Kind regards

Last edited by repo; 04-19-2012 at 02:04 PM.
 
Old 04-19-2012, 02:10 PM   #5
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
...or use "--force"
 
Old 04-19-2012, 02:10 PM   #6
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by unSpawn View Post
...or use "--force"
good idea but same problem as before.

(hans shot first )

Last edited by schneidz; 04-19-2012 at 02:15 PM.
 
Old 04-19-2012, 02:12 PM   #7
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by repo View Post
try to use
zcat



Kind regards
thanks, i think i am getting closer. now i am getting this error:
Code:
zcat vendor.837
vendor.837.Z: A file or directory in the path name does not exist.

Last edited by schneidz; 04-19-2012 at 02:14 PM.
 
Old 04-19-2012, 04:43 PM   #8
Spatior
Member
 
Registered: Jun 2009
Location: México
Distribution: Suse, Debian based, CentOs
Posts: 48

Rep: Reputation: 10
ok, sorry now i get the problem

look in the man of your gunzip for the -S option, if it exist try the command:

Code:
gunzip -S "" vendor-837-12-04-20-14:44:37.253
HTH
 
1 members found this post helpful.
Old 04-20-2012, 07:25 AM   #9
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
Quote:
Originally Posted by Spatior View Post
ok, sorry now i get the problem

look in the man of your gunzip for the -S option, if it exist try the command:

Code:
gunzip -S "" vendor-837-12-04-20-14:44:37.253
HTH
thanks, getting even closer, i am now getting this error
gunzip: vendor-837-12-04-20-14:44:37.253: cannot decompress onto itself

seems like some limitation of gunzip that i will need to handle in some sort of for loop.

thanks alot.


edit: i got creative and hacked something together that worx:
Code:
zgrep -E "(.|^$)" vendor-837-12-04-20-14:44:37.253 > vendor-837-12-04-20-14:44:37.253.txt
also, i just discovered the obvious:
Code:
cat vendor-837-12-04-20-14:44:37.253 | gunzip > vendor-837-12-04-20-14:44:37.253.txt

Last edited by schneidz; 11-02-2012 at 08:59 AM. Reason: added cat [i]nip[/i]
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
symbolic link suffix Latte Linux - Software 18 07-01-2010 09:54 AM
DNS suffix issues. BigglesPiP Linux - Networking 3 02-25-2009 03:18 PM
Static IP with DNS suffix Mr_Jones Linux - Newbie 2 02-17-2009 08:41 AM
DNS suffix Golzari-Ali Linux - General 2 09-30-2006 01:23 PM
using gunzip ekdya Debian 2 04-11-2006 08:05 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:51 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration