- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: sed gzipped files
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 09:35 AM
тАО08-28-2002 09:35 AM
sed gzipped files
Our vendors tech support person executed sed "s/$/6|/" filename.gz and screwed up some files.
Does anyone know how I can reverse sed changes to a gzipped file?
Regards,
Ken
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 09:41 AM
тАО08-28-2002 09:41 AM
Re: sed gzipped files
How about a restore from backup...
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 10:47 AM
тАО08-28-2002 10:47 AM
Re: sed gzipped files
sed "s/$/6|/" filename.gz
then the output was sent to the terminal and not to a file.
Was it something else they did??
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 01:23 PM
тАО08-28-2002 01:23 PM
Re: sed gzipped files
Anyway, they ran a script that had a line like this:
sed "s/$/6|/" ${file} > ${file}.new
mv ${file}.new ${file}
or this:
sed "s/366|6|$/6|/" ${file} > ${file}.new
mv ${file}.new ${file}
The files that were altered were already gzipped, so the sed command corrupted the files, but I am hoping there is a way to reverse what was done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 01:45 PM
тАО08-28-2002 01:45 PM
Re: sed gzipped files
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-28-2002 01:49 PM
тАО08-28-2002 01:49 PM
Re: sed gzipped files
I agree with JRF and CLAY, the files are TOAST. I ran the test myself and found that the "sed' removed the null strings from the file, rendering the files useless and unrecoverable. Unrecoverable, unless you are the nsa or CIA :-)
Get a Lawyer, get a company!
I'd persuade them that they owe you some SYSTEM upgrades, free software, new car, boat, hot tub, ... whatever your heart desires :-)
live free or die
harry
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО08-29-2002 09:32 AM
тАО08-29-2002 09:32 AM
Re: sed gzipped files
well, assuming that those files are IMPORTANT, and that you have endless resources at hand (like time, and diskspace), you could write a script which would - for each and every file - re-substitute one "6|" at line ends after another, then run "gzip -t" on it, to check wether it is consistent, then. Of course you will have to do that for all COMBINATIONS af resubstitutions and not-substitutions, so it will take endless hours...
And "sed" might have deleted" some characters in addition, like zero-bytes - then you are truely lost :-(
But before you do antyhing, get proof that you are NOT the guilty guy! Make them confess on paper, safe and print their ".*history" files or such...
Paranoids live longer,
Wodisch