I want to close all open finder windows from my terminal. I suppose I should use killall
.. but then what?
2 Answers
Use AppleScript via osascript
:
osascript -e 'tell application "Finder" to close windows'
killall
is to kill applications, not close windows.
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'