4

I am trying to uninstall the previous version of valgrind. I have manually deleted the specific valgrind folder, which was saved in my working directory and had a name valgrind 3.11, and now I try to check if anything is left in the system. I used find / -name valgrind -type d command in Terminal to see the list of places where valgrind directory could be. As a result I got an enormous list of something, which I can't decipher (I am a newbie and only learning programming, and CS).

Please, take a look at part of this list and help me to understand what it tells me, and what shall I do to make sure I don't have any traces of the valgrind program. Upon getting the list I have tried to access some shown folders with Go to in Finder, and with cd in Terminal, each time getting the same response that the folder cannot be found. Also before running this find command I have removed valgrind folders from

/usr/local/lib/valgrind
/usr/local/include/valgrind
/usr/local/share/doc/valgrind

Here is part of the list I see in my Terminal:

find / -name valgrind -type d

output:

find: /.com.apple.NetBootX: Permission denied
find: /.DocumentRevisions-V100: Permission denied
find: /.Spotlight-V100: Permission denied
find: /.TemporaryItems/folders.0: 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/ApplePushService: Permission denied
find: /Library/Application Support/com.apple.TCC: Permission denied
find: /Library/Caches/com.apple.iconservices.store: Permission denied
find: /Library/Server/Mail/Data/mta: Permission denied
find: /Library/Server/Mail/Data/spool/private: Permission denied
find: /Library/Server/Mail/Data/spool/public: Permission denied
find: /private/etc/cups/certs: Permission denied
find: /private/var/agentx: Permission denied
find: /private/var/at/tabs: Permission denied
find: /private/var/at/tmp: Permission denied
find: /private/var/audit: Permission denied
find: /private/var/backups: Permission denied
find: /private/var/db/caches/opendirectory: Permission denied
find: /private/var/db/ConfigurationProfiles/Setup: Permission denied
find: /private/var/db/dhcpclient: Permission denied
find: /private/var/db/diagnostics: Permission denied
find: /private/var/db/dslocal/nodes/Default: Permission denied

and on and on and on and then

find: /System/Library/Caches/com.apple.coresymbolicationd: Permission denied
find: /System/Library/DirectoryServices/DefaultLocalDB/Default: Permission denied

etc

Thank you very much!

Vitale
  • 153
  • 1
  • 2
  • 8

1 Answers1

5

The find command works by traversing each directory from left to right starting at the point of the directory you provide. In your case, you directed find to start with the root directory which means it will end up traversing the entire directory structure of your file system.

In order to view the contents of a directory it is necessary to have read permissions for that directory. You, as a regular user, do not have read permissions for all the folders in your file system. Running the find command as a regular user, while find is traversing its way through the directory tree, every time it comes upon a directory where you don't have read permissions it will throw off a Permission Denied error message like you're seeing in the example above.

Instead run your command as:

sudo find / -name valgrind -type d

....and you will not run into all the Permission Denied error messages and find will be able to search through your entire file system for any directories containing valgrind.

n8te
  • 7,480
  • 16
  • 30
  • 40