You can redirect a log file into a given directory. That directory, if it has other stuff in it, can get out of control. So, here, we’re going to remove all files except that file using the find command:
find * ! -name jamf.log -type f -delete
Once run, the jamf.log is the last file left in the directory.
krypted June 28th, 2015
Posted In: Mac OS X, Mac Security, Ubuntu, Unix
find, Linux, MAC, remove all but, remove files