1

I am attempting to obtain a list of applications on my Mac using find to search for *.app. However, when running the command, I get a lot of Permission denied messages, as below.

The computer is mine and I have administrative access. How can I run the command without the errors?

Last login: Thu Jul 17 07:42:01 on ttys000
pamelas-mbp:~ pamelabohler-sampson$ find / -iname *.app > ~/applications.txt
find: /.DocumentRevisions-V100: Permission denied
find: /.fseventsd: Permission denied
find: /.MobileBackups: Permission denied
find: /.Spotlight-V100: Permission denied
find: /.Trashes: Permission denied
find: /dev/fd/3: Not a directory
find: /dev/fd/4: Not a directory
find: /Library/Application Support/Apple/ParentalControls/Users: Permission denied
find: /Library/Application Support/com.apple.TCC: Permission denied
find: /Library/Caches/com.apple.Spotlight/schema.201.plist: Permission denied
[...]
find: /private/var/spool/postfix/private: Permission denied
find: /private/var/spool/postfix/public: Permission denied
find: /private/var/spool/postfix/saved: Permission denied
find: /private/var/spool/postfix/trace: Permission denied
find: /private/var/tmp/launchd: Permission denied
find: /System/Library/Caches/com.apple.coresymbolicationd: Permission denied
find: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied
2
  • sudo find / -iname *.app 2>/dev/null > ~/applications.txt for example, this will not write /dev/fd/4 to the file. Standard error is overlooked, stout it piped directly into txt file.You may be better off with sudo find ....etc, or creating a locate db sudo /usr/libexec/locate.updatedb , then locate [string--see help for further options]
    – njboot
    Jul 18 '14 at 11:57
  • I would run that as sudo find / -iname *app 2>/dev/null > ~/applications.txt
    – njboot
    Jul 18 '14 at 12:07
2

You need to be root to access certain system directories. Prepend your command with sudo:

sudo find / -iname *.app > ~/applications.txt

This will give a prompt for your password:

Password:

Enter your password (the characters will not be shown), then press Enter. The find command will then be run as root and have access to the directories.

2

You get those messages because as a normal User You don't have permissions to view directories listed. For example /.fseventsd is owned by root and only root can access it (drwx------ 587 root wheel). To get root privilages You have to run Your command with sudo. In Your case it'll be:

sudo find / -iname *.app > ~/applications.txt

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .