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 would like to make a log of all newly created files and/or folders under a particular directory. I'm trying to monitor what files are being moved to and copied from a directory on OSX Mountain Lion 10.8.3

share|improve this question

watch -d highlights added and removed lines for 2 seconds:

watch -d ls

-d=--cumulative shows the highlights permanently:

watch -d=--cumulative ls

Or add a line like this to crontab:

* * * * * ls ~/Desktop/ > /tmp/desktop-$(date +\%Y\%m\%d\%H\%M\%S)

And then compare the files:

$ diff -y /tmp/desktop-20130604105700 /tmp/desktop-20130604105800
file1                               file1
                                  > file2
$ comm -13 /tmp/desktop-20130604105700 /tmp/desktop-20130604105800
share|improve this answer

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.