New answers tagged folders
3
votes
Deleting all files but some on Mac in Terminal
First of all, it is important to remember that it is not Terminal that executes the commands, but the shell that runs inside it. On a reasonably recently created user account on a Mac, that shell will ...
7
votes
Deleting all files but some on Mac in Terminal
You can use find as follows (replace one general folder [before] as necessary):
find "one general folder [before]" -type f -not -iname "image-*jpg" -exec rm {} \;
The option -type ...
Top 50 recent answers are included
Related Tags
folders × 627macos × 304
finder × 211
terminal × 57
filesystem × 48
automator × 32
icon × 31
applescript × 30
file × 28
mac × 25
icloud × 25
permission × 23
command-line × 22
email × 20
ios × 19
applications × 18
desktop × 18
user-account × 16
bash × 15
mail.app × 14
symlink × 14
macbook-pro × 13
itunes × 12
hard-drive × 11
sharing × 11