5

I am in need to monitor the the writes from an unknown application to a known directory through creatbyproc.d. I'm going to have to leave this up and running for up to 36 hours which will not be possible without any filters without filling up the entire HDD.

These logs get very big very quickly and I need a way to only log particular information.

Currently my command reads:

sudo creatbyproc.d > /Users/MyUser/output.txt

A good answer would filter by folder: /private/tmp/

A great answer would allow wild card filtering: /private/tmp/*.txt

1 Answer 1

4

Use grep here is the man page for grep on osx there are some differences

sudo creatbyproc.d | grep -E "/private/tmp/.*txt$" > /Users/MyUser/output.txt
2
  • I have tried something similar myself but grep seems to half work. I can specify the path but the wild card entry for .txt does not work. I have tried .*txt$ --- *.*txt$ --- *.txt$ --- *.txt
    – user157445
    Sep 11, 2012 at 8:21
  • @user157445 - Try adding the -E seeing as you are on osx
    – Nifle
    Sep 11, 2012 at 16:23

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .