{"id":398,"date":"2012-11-22T13:06:03","date_gmt":"2012-11-22T12:06:03","guid":{"rendered":"http:\/\/songoku.homelinux.com\/wordpress\/?p=398"},"modified":"2012-11-22T13:06:03","modified_gmt":"2012-11-22T12:06:03","slug":"clean-shell-history-when-logging-out","status":"publish","type":"post","link":"https:\/\/ndk.sytes.net\/wordpress\/?p=398","title":{"rendered":"Clean shell history when logging out"},"content":{"rendered":"<p>\n\tHello,\n<\/p>\n<p>\n\tThere is a simple way of deleting bash&#39;s history at the logout. First create a file called&nbsp;<em>.bash_logout&nbsp;<\/em>in your user home directory and use the&nbsp;<em>clear<\/em>-command to clear the screen and the&nbsp;<em>history<\/em>-command to remove the history. Here is how it&#39;s done:\n<\/p>\n<p>\n\topen file:<br \/>\n\t<em># vim&nbsp;~\/.bash_logout<\/em>\n<\/p>\n<p>\n\tadd this to the file:<br \/>\n\t<em><span class=\"s1\">rm<\/span> <span class=\"s2\">-f<\/span> ~\/.bash_history<\/em><br \/>\n\t<em>clear<br \/>\n\thistory -c<\/em>\n<\/p>\n<p>\n\tSave and exit the file. Done \ud83d\ude09\n<\/p>\n<p>\n\tThe <em>-c <\/em>parameter deletes all history. If you want to delete the session hisotry only use&nbsp;<em>-r&nbsp;<\/em>instead.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hello, There is a simple way of deleting bash&#39;s history at the logout. First create a file called&nbsp;.bash_logout&nbsp;in your user home directory and use the&nbsp;clear-command to clear the screen and the&nbsp;history-command to remove the history. Here is how it&#39;s done: open file: # vim&nbsp;~\/.bash_logout add this to the file: rm -f ~\/.bash_history clear history -c [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11,7],"tags":[],"class_list":["post-398","post","type-post","status-publish","format-standard","hentry","category-linuxunix","category-servers"],"_links":{"self":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/398","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=398"}],"version-history":[{"count":0,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=\/wp\/v2\/posts\/398\/revisions"}],"wp:attachment":[{"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=398"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=398"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ndk.sytes.net\/wordpress\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=398"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}