How would I list all directories containing the program name "minecraft"?
If this is Unix, you could type "which Minecraft". If it is Windows, you could type ""where Minecraft". Add --all to the which command to list all the programs not just the first. Both programs search the PATH or in the case of Windows, the path plus certain runtime registry locations.
To find programs in places beyond the path, do the find command above, but add --perm to specify the an executable. Add --type f to limit it to files. In ancient days, there used to be an slocate command which searches an index.
dirname to locate all files with the name
minecraft in the current directory (adjust the search location to suit).
find . -type f -name minecraft | xargs -L 1 dirname
For finding files with executable permissions, you can use the
-perm option for find (adjust the value to suit your search criteria):
find . -type f -perm +0111 -name minecraft | xargs -L 1 dirname
This should print the directory path relative to the search location.
If you want to search your whole system, just pass
/ as the first argument to find.