{"id":74879,"date":"2026-10-06T03:01:00","date_gmt":"2026-10-05T17:01:00","guid":{"rendered":"https:\/\/www.rjmprogramming.com.au\/ITblog\/?p=74879"},"modified":"2026-09-27T16:11:31","modified_gmt":"2026-09-27T06:11:31","slug":"command-line-history-by-date-tutorial","status":"publish","type":"post","link":"https:\/\/www.rjmprogramming.com.au\/ITblog\/command-line-history-by-date-tutorial\/","title":{"rendered":"Command Line History By Date Tutorial"},"content":{"rendered":"<div style=\"width: 230px\" class=\"wp-caption alignnone\"><a target=\"_blank\" href=\"http:\/\/www.rjmprogramming.com.au\/Mac\/history_by_date.gif\" rel=\"noopener\"><img decoding=\"async\" style=\"border: 15px solid pink;\" alt=\"Command Line History By Date Tutorial\" src=\"http:\/\/www.rjmprogramming.com.au\/Mac\/history_by_date.gif\" title=\"Command Line History By Date Tutorial\"  style=\"float:left;\"  \/><\/a><p class=\"wp-caption-text\">Command Line History By Date Tutorial<\/p><\/div>\n<p>Linux and macOS both have a useful command line command <a target=\"_blank\" title='Command history information via Compterhope, thanks' href='https:\/\/www.computerhope.com\/history\/unix.htm' rel=\"noopener\"><i>history<\/i><\/a> to go back through recent commands you have used.  There could be the scenario where you want to list for a particular date on which you did something, as we&#8217;re picking 2026-09-20 for examples below  &#8230;<\/p>\n<table>\n<tr>\n<th>macOS<\/th>\n<th>Linux<\/th>\n<\/tr>\n<tr>\n<td>history -i 1 | grep &#8220;2026-09-20&#8221;<\/td>\n<td>history | grep &#8220;2026-09-20&#8221;<\/td>\n<\/tr>\n<tr>\n<td>\n<textarea id=leftta style=height:200px;width:100%;font-size:9px;>  963  2026-09-20 20:50  softwareupdate &#8211;install-rosetta<br \/>\n  964  2026-09-20 20:50  cd ..\/..<br \/>\n  965  2026-09-20 20:50  php -l pie_chart_python.php<br \/>\n  966  2026-09-20 20:50  cat piechartpyton.py<br \/>\n  967  2026-09-20 20:50  cat piechartpython.py<br \/>\n<\/textarea>\n<\/td>\n<td>\n<textarea id=rightta style=height:200px;width:100%;font-size:9px;>  379  2026-09-20 08:41:45 crontab -l<br \/>\n  380  2026-09-20 11:53:34 pwd<br \/>\n  381  2026-09-20 11:53:46 cd ~rjmprogr\/public_html\/Python<br \/>\n  382  2026-09-20 11:53:54 ls -la .htaccess<br \/>\n  383  2026-09-20 12:00:58 ls -l \/bin\/python3<br \/>\n<\/textarea>\n<\/td>\n<\/tr>\n<\/table>\n<p> &#8230; excerpts, as a case in point, for us, gleaning how we, on 2026-09-27 were wondering, back to when, on macOS, on 2026-09-20, we installed <a target=\"_blank\" title='macOS Rosetta regarding Intel based macOS applications' href='https:\/\/support.apple.com\/en-au\/102527' rel=\"noopener\">Rosetta<\/a>, regarding how we did it, for example.<\/p>\n<p>Interactively, on such command lines, a lot will allow you to immediately use arrow keys to go back and\/or forwards through historical commands to do with their chronological order.  Thanks to <a target=\"_blank\" title='Great advice' href='https:\/\/www.google.com\/search?q=macos+command+line+history+on+a+specified+date&#038;rlz=1C5OZZY_en&#038;oq=macos+command+line+history+on+a+specified+date&#038;gs_lcrp=EgZjaHJvbWUyCQgAEEUYORigATIHCAEQIRigATIHCAIQIRigATIHCAMQIRigATIHCAQQIRiPAjIHCAUQIRiPAtIBCTEzOTkyajBqN6gCALACAA&#038;sourceid=chrome&#038;source=chrome.ob&#038;ie=UTF-8' rel=\"noopener\">this link<\/a> for great advice on this topic.<\/p>\n<p><iframe src='\/About_Us.html' style=display:none; onload=\"var brbit=String.fromCharCode(60) + 'br '  + String.fromCharCode(47) + String.fromCharCode(62); parent.document.getElementById('leftta').value=parent.document.getElementById('leftta').value.replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,''); parent.document.getElementById('rightta').value=parent.document.getElementById('rightta').value.replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,'').replace(brbit,''); \"><\/iframe><\/p>\n<p>If this was interesting you may be interested in <a title='Click here to see topics in which you might be interested' href='#d74879' onclick='var dv=document.getElementById(\"d74879\"); dv.innerHTML = \"&lt;iframe width=670 height=600 src=\" + \"https:\/\/www.rjmprogramming.com.au\/ITblog\/tag\/command\" + \"&gt;&lt;\/iframe&gt;\"; dv.style.display = \"block\";'>this<\/a> too.<\/p>\n<div id='d74879' style='display: none; border-left: 2px solid green; border-top: 2px solid green;'><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Linux and macOS both have a useful command line command history to go back through recent commands you have used. There could be the scenario where you want to list for a particular date on which you did something, as &hellip; <a href=\"https:\/\/www.rjmprogramming.com.au\/ITblog\/command-line-history-by-date-tutorial\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12,19,29,37],"tags":[4931,5708,4752,233,234,5415,301,544,566,611,707,2178,885,2076,946,5703,1173,1319],"class_list":["post-74879","post","type-post","status-publish","format-standard","hentry","category-elearning","category-installers","category-operating-system","category-tutorials","tag-arrow","tag-arrow-keys","tag-chronological","tag-command","tag-command-line","tag-criteria","tag-date","tag-grep","tag-history","tag-install","tag-linux","tag-macos","tag-operating-system-2","tag-order","tag-pipe","tag-rosetta","tag-sort","tag-tutorial"],"_links":{"self":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74879"}],"collection":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/comments?post=74879"}],"version-history":[{"count":19,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74879\/revisions"}],"predecessor-version":[{"id":74902,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/posts\/74879\/revisions\/74902"}],"wp:attachment":[{"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/media?parent=74879"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/categories?post=74879"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rjmprogramming.com.au\/ITblog\/wp-json\/wp\/v2\/tags?post=74879"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}