{"id":4652,"date":"2017-07-03T23:19:25","date_gmt":"2017-07-03T23:19:25","guid":{"rendered":"http:\/\/www.softov.com.br\/blog\/?p=4652"},"modified":"2019-12-23T13:48:18","modified_gmt":"2019-12-23T13:48:18","slug":"change-timestamp-format-for-history-command-on-csh","status":"publish","type":"post","link":"https:\/\/softov.com.br\/blog\/2017\/07\/03\/change-timestamp-format-for-history-command-on-csh\/","title":{"rendered":"Change timestamp format for history command on csh"},"content":{"rendered":"<p>The first word indicates the number of history events to save. The optional second word (+) indicates the format in which history is printed; if not given, %h\\t%T\\t%R\\n is used. The format sequences are described below under prompt; note the variable meaning of %R. Set to 100 by default.<\/p>\n<p>&nbsp;<\/p>\n<p><!--more--><\/p>\n<p>Example<\/p>\n<blockquote><p>$ set history= ( 1000 &#8220;%h %W\/%D\/%Y %T %R\\n&#8221; )<\/p><\/blockquote>\n<p>Results in:<\/p>\n<blockquote><p>$ history<br \/>\n2 09\/08\/2014 22:48 set history= ( 1000 &#8220;%h %W\/%D\/%Y %T %R\\n&#8221; )<br \/>\n7 09\/08\/2014 22:49 ls<br \/>\n9 09\/08\/2014 22:49 echo &#8220;hi&#8221;<br \/>\n10 09\/08\/2014 22:49 history<\/p><\/blockquote>\n<p>This would result in the history being maintained for the last 1000 commands with the format of &#8220;%h %W\/%D\/%Y %T %R\\n&#8221;.<\/p>\n<ul>\n<li>%h &#8211; history #<\/li>\n<li>%W\/%D\/%Y &#8211; month\/day\/year<\/li>\n<li>`%T &#8211; 24 hr. time<\/li>\n<li>%R &#8211; command run<\/li>\n<\/ul>\n<p>The full descriptions of these macros is defined in the tcsh man page, scroll down to the section where the prompt command is explained. They&#8217;re there.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>The first word indicates the number of history events to save. The optional second word (+) indicates the format in which history is printed; if not given, %h\\t%T\\t%R\\n is used. The format sequences are described below under prompt; note the variable meaning of %R. Set to 100 by default. &nbsp;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[25,94],"tags":[],"_links":{"self":[{"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/posts\/4652"}],"collection":[{"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/comments?post=4652"}],"version-history":[{"count":3,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/posts\/4652\/revisions"}],"predecessor-version":[{"id":4702,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/posts\/4652\/revisions\/4702"}],"wp:attachment":[{"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/media?parent=4652"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/categories?post=4652"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/softov.com.br\/blog\/wp-json\/wp\/v2\/tags?post=4652"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}