Automatic device recognition in OSX

 
Thread Tools Search this Thread
Operating Systems OS X (Apple) Automatic device recognition in OSX
# 1  
Old 04-25-2009
Automatic device recognition in OSX

Can anyone point me to a resource (or answer my question) that will show me how to automatically run a script in OSX when a device is plugged in. The OS recognizes that the device is plugged in but how do I direct it to do something I want it to do.

it seems that linux has udev but what would be an equivalent for OSX
# 2  
Old 05-08-2009
you can attach a "Folder Action Script" to the director /Volumes
# 3  
Old 05-08-2009
a little bit more detailed explained.

1. right-click to the desktop then -> More --> Enable Folder Actions

2. in Terminal App open the window /Volumes
sudo open /Volumes

you will get a finder window opening showing the mount point /Volumes

3. right-click on /Volumes -> More --> Attach a Folder Actions and select the script
/Library -> Scripts -> Folder Action Scripts -> new item alert.scpt

4. plug in a device (memory stick for example) and see what happens.

hope this helps
blackwire
Login or Register to Ask a Question

Previous Thread | Next Thread

4 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

Conditional pattern recognition with awk

Hi, I would need some help extracting the desired data from the following text: # Time_result: 1.056179 next_value: 0.000077 OTHER VALUE 445552341; SELECT row with values # IP = 192.168.1.15 # Time: 45 # Time_result: 100.15 next_value: 0.000077 OTHER VALUE 445552341; SELECT row with... (2 Replies)
Discussion started by: alex2005
2 Replies

2. HP-UX

Failed to open tape device /dev/rmt/0mn:Device busy (errno = 16)

Hi, Unable to make tape backup, please help. /opt/ignite/bin/make_tape_recovery -a /dev/rmt/?mn -I -v -m tar -x inc_entire=vg00 * Creating local directories for configuration files and archive. ======= 04/25/16 16:28:08 IST Started /opt/ignite/bin/make_tape_recovery. (Mon... (4 Replies)
Discussion started by: anuragr
4 Replies

3. Shell Programming and Scripting

Automatic Email of Log Files in OSX

Hi, I am trying to write a shell script that will take the log files from a single folder (all ending with .log), put them into an archive, use something to encrypt the file, and then emailx to email the resulting encrypted archive to me. Of course, I am open to suggestions on how to improve... (1 Reply)
Discussion started by: DotNaBox
1 Replies

4. UNIX for Dummies Questions & Answers

Pattern Recognition - perl

can someone help me with this.. cant for the life of me figure it out.. =~ m!^(/.*)/bin/xx! specific query > What does m!^ do > What does the ! at the end do.. (3 Replies)
Discussion started by: scorreg
3 Replies
Login or Register to Ask a Question