Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question

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
share|improve this answer
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 '12 at 8:21
@user157445 - Try adding the -E seeing as you are on osx – Nifle Sep 11 '12 at 16:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.