Launchd and Folder Actions are two vastly different concepts.
Folder Actions
Folder Actions allow you to attach actions in the form of Apple Scripts folders which get triggered if the content of the folder changes. Typical use cases are e.g.
- a folder to auto-upload photos to a website
- removal of file attributes (e.g. the "downloaded" attribute)
- triggering import into Evernote
- etc.
launchd
launchd is a system-wide feature to run and control system-level background tasks. These can be either running all the time or get triggered by specific events (e.g. a connection request coming in over IP, a changing folder, a specific point in time etc.). OS X makes heavy use of this concept for all kind of things, have a look at the names in /Library/LaunchAgents
and /Library/LaunchDaemons
to get an idea of functionality depending on launchd.
Because launchd is a system service running in the background all the time it can't be accessed by the user directly. To send commands to launchd, the launchctl
command is used.
Answers to specific questions
- Do folder actions use launchd?
Most probably not. You can use launchd to do everything folder actions can do but at least on a level visibile to the user these are two different concepts
- Is one more efficient than the other?
No difference here, both get triggered by OS X upon special conditions.
- Is one more powerful than the other?
launchd is definitively more powerful.
- Is one used more over the other?
In a newly installed system there already is a great number of active launchd scripts but no folder actions. Because the later must be explicitely activated and configured by the user, it's probably a safe guess that launchd is used more often.
The standard way of approaching these terms is to say that an "application" is a specific, static program on storage. It's some piece of code stored on a hard drive, a CD-ROM or elsewhere.
A "process" on the other hand is a specific instance of a running program. I.e. it is registered by the operating system as executing or being able to execute whenever the operating system feels like it.
If you take for example Calculator.app, it is a single application.
However you can have multiple Calculator processes if you start the program multiple times.
As chananelb wrote, it is also possible to have processes which are not "just" ordinary applications that have been started up. That could be for example kernel processes, or simply ordinary processes spawning up subprocesses to do specific tasks.
Regarding services, I chananelb's answer leads you in the wrong direction. His answer tells you about what is called a "Service" in Mac OS X... but you asked about what is called a "Service" in Windows.
The counterpart to a Windows Service is a Daemon on Mac OS X (and other Unix-derived systems).
Daemons are normally categorized by running in the "background", i.e. without direct user interaction through a graphical or non-graphical user interface. The distinction is a bit blurry though, as a Daemon might for example have a web interface for user interaction.
Daemons on Mac OS X are controlled by the launchd program, which is responsible for for example starting up daemons on boot, and letting the user start and stop daemons at request.
Best Answer
As in all the Unix system, there are two type of
lib
folder.One specific for the user and the other for the entire system and so all the users of the machine.
In particular for OS X: the Macintosh HD version is the actual computer Library, while, the home folder version is specific to your user account.
Here an example to help you understand how to use it:
/System/Library
is a place to store fonts, screen savers, Dashboard widgets, and all other things that all local users need access to.~/Library
is for your own user account only (cache and preference files, widgets for your use only, etc).EDIT: taken from here, a complete overview of all the possible library folders in a Mac OS X system:
The user library, ~/Library, stores per-user settings etc.
The local library, /Library, stores computer-wide settings and all-users content etc. I call this the "local" library, because in NextStep it was /Local/Library, but you'll see all sorts of other names for it, such as the root library, computer library, ...
The network library, /Network/Library would store settings shared by all computers in a network domain -- if a network domain admin set one up, which nobody does anymore...
The system library, /System/Library, stores the base settings, resources, etc that come with OS X. In theory, you shouldn't change anything in here.