1686
.DS_Store (sh.itjust.works)
you are viewing a single comment's thread
view the rest of the comments
[-] MissingInteger@lemm.ee 3 points 2 days ago

fd -HI '^\.DS_Store$' $HOME -tf -X rm -v

[-] DarkDarkHouse@lemmy.sdf.org 0 points 2 days ago

find . -name “.DS_Store” -type d -exec rm -rf {} + -print

[-] MissingInteger@lemm.ee 3 points 2 days ago

That doesn't work, DS_Store are files not directories ( you need to use -type f).
An equivalent find command would be:
find "$HOME" -type f -name '.DS_Store' -delete -print
find takes a while; fd is way, way faster, but find is preinstalled, so there is that.

this post was submitted on 28 Jan 2025
1686 points (99.6% liked)

Programmer Humor

20033 readers
1616 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS