The command grep -v
allows filtering out a term or regex from the input. You can use a pipe (|
) to combine multiple grep -v commands.
Example: grep -v firewall /var/log/system.log | grep -v imagent | grep -v mdworker
The first grep command in this example operates on the file contents; the subsequent grep commands operate on the output of the previous grep command.
grep is located at /usr/bin/grep on my Lion system. For more information on using grep, read the man page with the command man 1 grep
or just man grep
.
Edit: Command line can be shortened to
grep -v 'firewall\|imagent\|mdworker' /var/log/system.log
This is an old question, but just in case someone stumbles on it and is specifically worried about the privacy implications of Notification Center, the answer is YES, OS X does keep a log of notifications on disk.
The format is an sqlite database, and it can be found inside this folder:
~/Library/Application Support/NotificationCenter
Inside you'll find at least one .db file for your account, i've seen some that OS X apparently considered corrupt at one point, so they're called .db.corrupt.
Running the strings command on this file will show you a load of binary data, quite a few "NSSomething" class names, and yes, your iMessages, file paths, twitter and facebook notifications and anything else that was sent to Notification Center by an app or the system.
If you want to get rid of that file at a specific point in time, you can kill usernoted temporarily (it'll restart itself) and delete the file in one shot (run this as your user account, not with sudo):
killall usernoted && rm ~/Library/Application\ Support/NotificationCenter/*.db
This will, 99% of the time, catch usernoted while it's temporarily not running, successfully delete the old database, and usernoted will make a new empty one when it starts again.
This isn't a good solution if you're really worried about privacy, but aside from encrypting your system or using a ramdisk for that folder, there really isn't a solution.
Best Answer
deleted
is the process for CacheDelete, which is used to purge caches on disk. Looking in/System/Library/CacheDelete/
you can see what services are registered as a client.