To make 'rmdir' and 'find -delete' ignore '.DS_Store' files
0
votes
2
answers
259
views
On macOS, there is a hidden file
.DS_Store
in some directories (well, in most of them).
The problem with .DS_Store
files is that rmdir
and find . -depth 1 -type d -empty -print -delete
don't delete such directories.
I suspect there is no straightforward way to handle this, such as nonexistent --ignore_ds_store
option of rmdir
, so maybe there is a workaround. The default macOS shell is zsh
, so maybe the workaround is possible using some of zsh
features; so I added the 'zsh' tag to the question.
Asked by jsx97
(1347 rep)
Aug 16, 2024, 07:44 PM
Last activity: Aug 18, 2024, 09:29 AM
Last activity: Aug 18, 2024, 09:29 AM