Skip to main content
The 2024 Developer Survey results are live! See the results

Questions tagged [zgrep]

The tag has no usage guidance.

0 votes
1 answer
111 views

How to use different options at same search with Zgrep

How may I use zgrep to search for A where B is missing. Like: -v This option is used to display the lines which doesn’t have the expression present in it. tried: zgrep "search_for_this" | ...
PlayHardgoPro's user avatar
0 votes
1 answer
697 views

Want to find a string with in all subdirectories in a folder

Suppose i'm in a folder /data/ The folder data contains 10 other folders /data/temp1 /data/temp2 /data/temp3 and so on all of which have .gz files in them , i.e temp1 , temp2 , temp3 till temp10 ...
Ali Hamza Hussain's user avatar
0 votes
1 answer
441 views

Perform operations on the output of find command with -exec options

I want to perform operations on the files found by the find command which already has a -exec option. find . -type f -exec zgrep -li "4168781103" {} + Output: ./results/...
Prithvi Jayaraman's user avatar
0 votes
1 answer
2k views

Would the performance of this `grep` or `zgrep` command benefit from more memory, or from a faster CPU?

I have the following commands: time grep -F -f 'in2.txt' test.fastq time zgrep -F -f 'in2.txt' test.fastq.gz There are about 30 search terms on files with ~5 GB. However I notice that on one ...
ahdee's user avatar
  • 1
2 votes
0 answers
127 views

Search text in zipped files and move them to other folder

Friends, On my Mac, I have 100s of zip files in a directory named Test. Let's assume I have files a.zip,b.zip,c.zip....... Now I want to grep all files for a text "searchText" and move the matching ...
Nirav Shah's user avatar
2 votes
1 answer
3k views

Grep with string comparison: return only lines "higher than" a timestamp

I have an email log file which records when an email went out, and who to. This gets logrotated and so there are a mixture of zipped and unzipped log files going back a week or so. I'm currently (...
Max Williams's user avatar
  • 3,039