{"id":2114,"date":"2015-07-31T14:49:39","date_gmt":"2015-07-31T21:49:39","guid":{"rendered":"http:\/\/arcanius.silverfir.net\/blog\/?p=2114"},"modified":"2015-07-31T14:49:39","modified_gmt":"2015-07-31T21:49:39","slug":"how-to-reattach-to-screen-when-screen-r-d-hangs","status":"publish","type":"post","link":"https:\/\/arcanius.silverfir.net\/blog\/how-to-reattach-to-screen-when-screen-r-d-hangs\/","title":{"rendered":"How to Reattach to Screen When `screen -r -d` hangs"},"content":{"rendered":"<p>Based on an <a href=\"http:\/\/serverfault.com\/questions\/98535\/cant-get-detached-screen-to-resume\">answer on serverfault<\/a>, but modified to work on linux:<\/p>\n<p>Use this one-liner to get the bash and sshd processes currently hanging onto the old screen.<\/p>\n<p><code>ps aux | grep $(ps aux | grep [s]creen | grep -o 'pts[^ ]*') | grep 'sshd\\|bash'<\/code><\/p>\n<p>Kill these processes and screen is recoverable before the long and arbitrary timeout.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Based on an answer on serverfault, but modified to work on linux: Use this one-liner to get the bash and sshd processes currently hanging onto the old screen. ps aux | grep $(ps aux | grep [s]creen | grep -o &#8216;pts[^ ]*&#8217;) | grep &#8216;sshd\\|bash&#8217; Kill these processes and screen is recoverable before the long [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[8],"class_list":["post-2114","post","type-post","status-publish","format-standard","hentry","category-everything","tag-technology"],"_links":{"self":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts\/2114","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/comments?post=2114"}],"version-history":[{"count":3,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts\/2114\/revisions"}],"predecessor-version":[{"id":2118,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/posts\/2114\/revisions\/2118"}],"wp:attachment":[{"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/media?parent=2114"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/categories?post=2114"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/arcanius.silverfir.net\/blog\/wp-json\/wp\/v2\/tags?post=2114"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}