'Can't delete folders in contents of Mac .app whose names contain a certain character
Using Mac OS 12.3.1 but have limited experience working at the terminal.
I've written an .app using Python and Pyinstaller. It works fine, but for certain reasons, I need to delete folders within the PyQt5 directory of the application bundle that contain a period in their name. Typing
find my_app.app/Contents/MacOS/PyQt5 -name "*.*" -type d
shows me the correct folders, but after trying
find my_app.app/Contents/MacOS/PyQt5 -name "*.*" -type d -delete
and reopening my_app.app/Contents/MacOS/PyQt5, I still see the folders present. I must be missing something simple here.
Solution 1:[1]
find my_app.app/Contents/MacOS/PyQt5 -name "." -type d -exec rm -r {} +
appears to work.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | fishbacp |
