Is there an inverse command to open in the Terminal?

By using open, I can open a file via terminal.

For example:

$ open ~/Documents/notes.pdf 

opens the file notes.pdf in the Documents folder of my home directory. It shows up as a window. Now I'm wondering:

Is there an opposite terminal command with which I can close the opened window (besides kill <pid>)?


Use AppleScript via osascript

 osascript -e 'quit app "Preview"'

Category: osx Time: 2016-07-31 Views: 5
Tags: osx terminal

Related post

iOS development

Android development

Python development

JAVA development

Development language

PHP development

Ruby development


Front-end development


development tools

Open Platform

Javascript development

.NET development

cloud computing


Copyright (C), All Rights Reserved.

processed in 0.219 (s). 12 q(s)