To clear things up I have setup folder actions on my mac for whenever a USB device is plugged into my mac it will run a shell script.
When I list all files in the Directory /Volumes i get
$ ls -a . .. .DS_Store MobileBackups Storage WED
What I want to do is list all folders and files located in WED or any USB that pops up, so therefore excluding the directories
. .. .DS_Store MobileBackups Storage
Leaving me with
What i have for the script so far is:
GLOBIGNORE='/Volumes/MobileBackups*':'/Volumes/Storage*' find '/Volumes' >> /Users/Brett/dev/USBLOGS/LogUSB.txt
I have tried multiple different ways but it still ends up listing every single file in the /Volumes directory.
Any help would be greatly appreciated. Thanks, Brett
Additionally, it is MAC OS X El Capitan