Timeline for Search strings in (.gz) zipped folder with files in it [closed]
Current License: CC BY-SA 4.0
15 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 12, 2019 at 18:12 | history | closed |
Kusalananda♦ Daniele Santi Jeff Schaller♦ peterh Thomas |
Needs details or clarity | |
| Jan 11, 2019 at 15:39 | comment | added | Praveen K P | Kusal, edited the question - to be more specific, i ll state in simpler words here - i need to search some content/string in the zipped folder (.tar.gz) where this zipped folder inturn have the (*.log01, *log02, etc) files inside it. so in actual, i need to search a string/content int he zipped folder log files and should display the file names in which the string exists. hope this is clear now. | |
| Jan 11, 2019 at 15:34 | history | edited | Praveen K P | CC BY-SA 4.0 |
added 140 characters in body
|
| Jan 11, 2019 at 15:02 | comment | added | Kusalananda♦ | @PraveenKP Could you please edit your question and mention what it is that you expect as output? I see your comment saying "i should get the string 1234536 containing list of files", but I don't understand what you mean by it. | |
| Jan 11, 2019 at 14:04 | answer | added | Haxiel | timeline score: 1 | |
| Jan 11, 2019 at 13:35 | comment | added | Praveen K P | @Dasel - i would do the tar before if it is one or two files, but i have some hundreds of zipped files where i need to search the string and extract the result. | |
| Jan 11, 2019 at 13:28 | comment | added | Praveen K P | the expected result need to be - i should get the string 1234536 containing list of files. zgrep -ia 1234536 PROD_* | |
| Jan 11, 2019 at 13:10 | review | Close votes | |||
| Jan 12, 2019 at 18:12 | |||||
| Jan 11, 2019 at 12:54 | comment | added | Dasel | Thanks @RomeoNinov; I did not saw the name; in that case we need first to know which is expected, as otherwise is difficult to debug. Anyway it would be much easier to do tar -ztvf PROD_009_010919_0110.tar.gz and after that use a normal grep to search the wanted result, but of course the ideal would be to have a sample of the expected output. | |
| Jan 11, 2019 at 12:43 | comment | added | Romeo Ninov |
@Dasel, based on the filename it seems to be tar-ed before gzip-ed
|
|
| Jan 11, 2019 at 12:42 | history | edited | Romeo Ninov | CC BY-SA 4.0 |
code reformat
|
| Jan 11, 2019 at 12:37 | comment | added | Dasel | gzip does not zip folders, only files so I suppose that you are using another zipper apart from gz right? Have you checked with gzip -l the content of of your gz? | |
| Jan 11, 2019 at 12:30 | comment | added | Kusalananda♦ | What do you want to do? Do you want to extract a piece of text from one of the files in the archive, or do you want to test whether a particular file is part of the archive? In short, what is the expected result? | |
| Jan 11, 2019 at 12:30 | review | First posts | |||
| Jan 11, 2019 at 13:49 | |||||
| Jan 11, 2019 at 12:26 | history | asked | Praveen K P | CC BY-SA 4.0 |