

{"id":201,"date":"2016-05-18T13:52:35","date_gmt":"2016-05-18T03:52:35","guid":{"rendered":"https:\/\/kng.tech\/blog\/?p=201"},"modified":"2016-06-09T11:33:36","modified_gmt":"2016-06-09T01:33:36","slug":"osx-terminal-commands","status":"publish","type":"post","link":"https:\/\/kng.tech\/blog\/osx-terminal-commands\/","title":{"rendered":"OSX Terminal Commands"},"content":{"rendered":"<p><strong>Caching related:<\/strong><br \/>\n<code>sudo serveradmin stop caching<br \/>\nsudo serveradmin start caching<br \/>\nsudo serveradmin status caching<\/code><\/p>\n<p><code><br \/>\ntail -F \/Private\/var\/log\/system.log<br \/>\ntail -F \/Library\/Server\/Caching\/Logs\/Debug.log<\/code><\/p>\n<p>example:<br \/>\n<code>grep 'Since server start:' \/Library\/Server\/Caching\/Logs\/Debug.log<br \/>\ngrep 'B from cache' \/Library\/Server\/Caching\/Logs\/Debug.log<br \/>\negrep 'Since server start|B from cache' \/Library\/Server\/Caching\/Logs\/Debug.log<br \/>\ngrep '2015-09' \/Library\/Server\/Caching\/Logs\/Debug.log | grep 'Since server start|B from cache'<br \/>\ngrep -J 'MB downloaded' \/Library\/Server\/Caching\/Logs\/Debug* &gt; fromInternet.txt<br \/>\ngrep -J 'MB from cache' \/Library\/Server\/Caching\/Logs\/Debug* &gt; fromCached.txt<br \/>\ngrep -J 'Since server start' \/Library\/Server\/Caching\/Logs\/Debug* &gt; SinceServerStart.txt<br \/>\n<\/code><\/p>\n<p><strong>SSH, Mapped Drive &amp; Copy stuffs:<\/strong><code><br \/>\nssh computername<br \/>\ncd \/<br \/>\nsudo mkdir scripts<br \/>\nsudo mkdir \/Volumes\/mnt<br \/>\nsudo mount_afp afp:\/\/osxserver.domain.com\/mnt \/Volumes\/mnt<br \/>\nsudo cp \/Volumes\/mnt\/homedrive.sh \/scripts<br \/>\nsudo cp -R \/Volumes\/mnt\/MappedDrive.app \/Applications<br \/>\nsudo cp -R \/Volumes\/mnt\/StudentShared.app \/Applications<br \/>\nsudo cp -R \/Volumes\/mnt\/Microsoft\\ Remote\\ Desktop.app \/Applications<br \/>\nsudo umount \/Volumes\/mnt<br \/>\n<\/code><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Caching related: sudo serveradmin stop caching sudo serveradmin start caching sudo serveradmin status caching tail -F \/Private\/var\/log\/system.log tail -F \/Library\/Server\/Caching\/Logs\/Debug.log example: grep 'Since server start:' \/Library\/Server\/Caching\/Logs\/Debug.log grep 'B from cache' \/Library\/Server\/Caching\/Logs\/Debug.log egrep 'Since server start|B from cache' \/Library\/Server\/Caching\/Logs\/Debug.log grep '2015-09' \/Library\/Server\/Caching\/Logs\/Debug.log | grep 'Since server start|B from cache' grep -J 'MB downloaded' \/Library\/Server\/Caching\/Logs\/Debug* &gt; fromInternet.txt [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[49,26,32],"class_list":["post-201","post","type-post","status-publish","format-standard","hentry","category-tech","tag-apple-caching","tag-osx","tag-terminal"],"_links":{"self":[{"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/posts\/201","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/comments?post=201"}],"version-history":[{"count":5,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions"}],"predecessor-version":[{"id":276,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/posts\/201\/revisions\/276"}],"wp:attachment":[{"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/media?parent=201"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/categories?post=201"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/kng.tech\/blog\/wp-json\/wp\/v2\/tags?post=201"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}