open -jga TextEditTextEdit를 숨기고 ( -j) 맨 앞으로 만들지 않고 ( ) 엽니 다 -g. 이 -j옵션은 10.8에 추가되었으며 도움말 페이지에만 표시되며 매뉴얼 페이지에는 표시되지 않습니다. TextEdit이 이미 실행 중이면 open -ja TextEdit(없이 -g) TextEdit을 맨 앞으로 만 숨기지 않습니다. TextEdit 및 Mail과 같은 일부 응용 프로그램의 open -jg경우 응용 프로그램이 실행 중이지만 열려있는 창이없는 경우 새 보이는 창을 열지 만 pgrep -x TextEdit||open -jga TextEdit해결 방법으로 사용할 수 있습니다 .
10.9 이상에서 두 번째 옵션은 lsappinfo launch launchandhide=true nofront=true /Applications/TextEdit.app입니다.
세 번째 옵션은 osascript -e 'launch app "TextEdit"'입니다. open및 lsappinfo명령 과 달리 응용 프로그램이 열릴 때까지 차단됩니다. TextEdit 및 Mail과 같은 일부 응용 프로그램의 경우 launch명령이 응용 프로그램이 아직 실행되고 있지 않은 경우 표시되는 새 창을 엽니 다.
편집 : 위의 옵션 중 어느 것도 VirtualBox에서 작동하지 않는 것 같지만 VirtualBox를 연 후에 숨길 수 있습니다.
open -jga VirtualBox;lsappinfo setinfo -app VirtualBox kLSApplicationIsHiddenKey=true
osascript -e 'launch app "VirtualBox"' -e 'delay 1' -e 'tell app "System Events" to set visible of process "VirtualBox" to false'