{"id":3386,"date":"2019-11-29T15:12:00","date_gmt":"2019-11-29T15:12:00","guid":{"rendered":"https:\/\/www.chrislamb.com\/?p=3386"},"modified":"2020-01-04T15:20:41","modified_gmt":"2020-01-04T15:20:41","slug":"useful-commands-often-overlooked","status":"publish","type":"post","link":"https:\/\/www.chrislamb.com\/?p=3386","title":{"rendered":"Useful commands &#8211; often overlooked"},"content":{"rendered":"\n<p class=\"has-medium-font-size\"><strong>Linux\/Unix etc<\/strong><\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p><strong>htop<\/strong> ::  Shows process information in an interactive display from the command line on a *nix box<\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-normal-font-size\"><strong>lsof  <\/strong>::  This lists &#8220;Open Files&#8221; on a *nix system &#8211; the common arguments are: -i  -P and -n<br>The -i option means show IP sockets  -P means do NOT show port names but only port numbers ( ie not https but 443) and the -n means no DNS lookup (do not show hostnames)<\/p>\n\n\n\n<p>see:  <a href=\"https:\/\/www.howtoforge.com\/linux-lsof-command\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/www.howtoforge.com\/linux-lsof-command\/ (opens in a new tab)\">https:\/\/www.howtoforge.com\/linux-lsof-command\/<\/a> <\/p>\n\n\n\n<hr class=\"wp-block-separator\"\/>\n\n\n\n<p class=\"has-medium-font-size\"><strong>Powershell<\/strong><\/p>\n\n\n\n<p>Powershell has a Grep type command which I find very useful:<\/p>\n\n\n\n<p><strong>Select-String<\/strong> <em>-Path<\/em> C:\\temp\\*.log <em>-Pattern<\/em> &#8220;Dichotomy Larder&#8221;<\/p>\n\n\n\n<p>See: <a href=\"https:\/\/www.thomasmaurer.ch\/2011\/03\/powershell-search-for-string-or-grep-for-powershell\/\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\"https:\/\/www.thomasmaurer.ch\/2011\/03\/powershell-search-for-string-or-grep-for-powershell\/ (opens in a new tab)\">https:\/\/www.thomasmaurer.ch\/2011\/03\/powershell-search-for-string-or-grep-for-powershell\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Linux\/Unix etc htop :: Shows process information in an interactive display from the command line on a *nix box lsof :: This lists &#8220;Open Files&#8221; on a *nix system &#8211; the common arguments are: -i -P and -nThe -i option means show IP sockets -P means do NOT show port names but only port numbers [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2}},"categories":[27],"tags":[],"class_list":["post-3386","post","type-post","status-publish","format-standard","hentry","category-code"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p53QCd-SC","_links":{"self":[{"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/posts\/3386","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=3386"}],"version-history":[{"count":4,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/posts\/3386\/revisions"}],"predecessor-version":[{"id":3461,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=\/wp\/v2\/posts\/3386\/revisions\/3461"}],"wp:attachment":[{"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=3386"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=3386"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.chrislamb.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=3386"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}