8

I want to close all open finder windows from my terminal. I suppose I should use killall.. but then what?

2 Answers 2

10

Use AppleScript via osascript:

osascript -e 'tell application "Finder" to close windows'

killall is to kill applications, not close windows.

5

This one is similar but solves too, and I was able to drop even the Info windows in case they are open:

osascript -e 'tell application "Finder" to close every window'

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .