LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 06-24-2014, 09:14 AM   #1
GameoverII
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Rep: Reputation: Disabled
Newbie grep help


Hi,

I need some help with some grep statements. I have a file that I created that contains some 22 suspicious hashes from some .exe's.
I want to compare them against a directory that contains thousands of other known malicious files and see if any of them match.

Here's what I've tried so far:
grep -i "A4878AS785ASD8715A545SAD" /Master/Cases/Malicious_Hashes.csv

Then I tried:
grep /Master/Cases/06232014_01/JAN2014_hashes.txt > /Master/Cases/Malicious_hashes.csv

Any help would be appreciated. Thanks.
 
Old 06-24-2014, 09:32 AM   #2
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fc-15/ fc-20-live-usb/ aix
Posts: 5,149

Rep: Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887Reputation: 887
there is a recurse option (-r) for grep to descend into directories.

the basic format is
Code:
grep string /list/of/files
if there is still a question please provide a few line example before-and-after.
 
Old 06-24-2014, 10:49 AM   #3
GameoverII
LQ Newbie
 
Registered: Jun 2014
Posts: 2

Original Poster
Rep: Reputation: Disabled
So I tried the -r and it seems to be working. How well it works is unknown cause it has the processor pegged right now.

I tried:
grep -r *MD5 Hash /mnt/windows_mnt
 
Old 06-24-2014, 11:40 AM   #4
grail
LQ Guru
 
Registered: Sep 2009
Location: Perth
Distribution: Manjaro
Posts: 9,550

Rep: Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898Reputation: 2898
If you do not quote the string you are looking for the shell will expand the asterisk prior to being used. Generally this is not the desired effect.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Creating an alias in ksh that uses grep and includes 'grep -v grep' doug248 Linux - Newbie 2 08-05-2012 03:07 PM
newbie needs help for grep and awk parker Programming 1 08-12-2003 05:24 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:48 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration