<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>linux history Archives - Linux Windows and android Tutorials</title>
	<atom:link href="https://www.osradar.com/tag/linux-history/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.osradar.com</link>
	<description>tutorials and news and Seurity</description>
	<lastBuildDate>Thu, 22 Nov 2018 18:51:38 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=5.8.12</generator>
	<item>
		<title>Check Terminal History on Linux</title>
		<link>https://www.osradar.com/check-terminal-history-on-linux/</link>
					<comments>https://www.osradar.com/check-terminal-history-on-linux/#respond</comments>
		
		<dc:creator><![CDATA[osradar_editor]]></dc:creator>
		<pubDate>Thu, 22 Nov 2018 17:49:17 +0000</pubDate>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Linux]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[history]]></category>
		<category><![CDATA[linux history]]></category>
		<category><![CDATA[linux terminal]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[terminal history]]></category>
		<guid isPermaLink="false">https://www.osradar.com/?p=7564</guid>

					<description><![CDATA[<p>When you’re running tons of commands every single day, it’s obvious that you may want to keep a track of your terminal activities. For advanced Linux users, this is the burning truth. Well, if your terminal is set to remember history, then checking out the entire history shouldn’t be a problem at all. Need to [&#8230;]</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/check-terminal-history-on-linux/">Check Terminal History on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></description>
										<content:encoded><![CDATA[<p>When you’re running tons of commands every single day, it’s obvious that you may want to keep a track of your terminal activities. For advanced Linux users, this is the burning truth. Well, if your terminal is set to remember history, then checking out the entire history shouldn’t be a problem at all.</p>
<p>Need to find out the history with date and time? Let’s get started!</p>
<h1>Checking history</h1>
<p>At first, let’s make sure that the time format of the history is set. For that purpose, we have to define an environmental variable “HISTTIMEFORMAT”.</p>
<p>Run the following command –</p>
<pre class="">sudo -s

HISTTIMEFORMAT=”%m/%d/%y %T ”</pre>
<p><img loading="lazy" class="size-full wp-image-7566 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/history-1.png" alt="" width="1079" height="130" srcset="https://www.osradar.com/wp-content/uploads/2018/11/history-1.png 1079w, https://www.osradar.com/wp-content/uploads/2018/11/history-1-300x36.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/history-1-768x93.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/history-1-1024x123.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/history-1-696x84.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/history-1-1068x129.png 1068w" sizes="(max-width: 1079px) 100vw, 1079px" /></p>
<p>Let’s check out what each of the parts means.</p>
<ul>
<li>%m – Month</li>
<li>%d – Day of the month</li>
<li>%y – Year</li>
<li>%T – Time of the command running</li>
</ul>
<p>After setting the variable, it’s time to check out the history. Run the following command –</p>
<pre class="">history</pre>
<p><img loading="lazy" class="size-full wp-image-7567 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/history-2.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/history-2.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-696x482.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/history-2-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /> <img loading="lazy" class="size-full wp-image-7568 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/history-3.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/history-3.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-696x482.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/history-3-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /> <img loading="lazy" class="size-full wp-image-7569 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/history-4.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/history-4.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-696x482.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/history-4-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /></p>
<p>Voila! You can find out the entire history of all the commands you ran previously.</p>
<h3><strong>Run command from history</strong></h3>
<p>run the command  again  1065 (sudo localctl set-local LANG=en_US.UTF-8)</p>
<pre class="">#!1065</pre>
<p><strong>Control the total number of lines in the history using HISTSIZE</strong></p>
<p>Append the following two lines to the .bash_profile and relogin to the bash shell again to see the change. In this example, only 1000 commands will be stored in the bash history.</p>
<pre class=""># vi ~/.bash_profile
HISTSIZE=1000
HISTFILESIZE=1000</pre>
<h3><strong>Clear all the previous history using option -c</strong></h3>
<p>if you want to clear all the previous history, but want to keep the history moving forward.</p>
<pre class=""># history -c</pre>
<p>The command “history” is also highly customizable with various available parameters.</p>
<p>Check out all the available “history” features –</p>
<pre class="">man history</pre>
<p>&nbsp;</p>
<p><img loading="lazy" class="size-full wp-image-7570 aligncenter" src="https://www.osradar.com/wp-content/uploads/2018/11/history-5.png" alt="" width="1060" height="734" srcset="https://www.osradar.com/wp-content/uploads/2018/11/history-5.png 1060w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-300x208.png 300w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-768x532.png 768w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-1024x709.png 1024w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-100x70.png 100w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-218x150.png 218w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-696x482.png 696w, https://www.osradar.com/wp-content/uploads/2018/11/history-5-607x420.png 607w" sizes="(max-width: 1060px) 100vw, 1060px" /></p>
<p>You can also export the man page to a text file for later reading.</p>
<pre class="">man history &gt; ~/Desktop/history.txt</pre>
<p>Enjoy!</p>
<p>The post <a rel="nofollow" href="https://www.osradar.com/check-terminal-history-on-linux/">Check Terminal History on Linux</a> appeared first on <a rel="nofollow" href="https://www.osradar.com">Linux  Windows and android  Tutorials</a>.</p>
]]></content:encoded>
					
					<wfw:commentRss>https://www.osradar.com/check-terminal-history-on-linux/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
	</channel>
</rss>
