<?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>opensourcetutor.com &#187; Bash</title>
	<atom:link href="http://www.opensourcetutor.com/tag/bash/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.opensourcetutor.com</link>
	<description>On Linux, Web Development, Joomla and Magento commerce</description>
	<lastBuildDate>Fri, 20 Aug 2010 06:42:54 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>View memory brand, manufacturer &amp; serial number in Linux</title>
		<link>http://www.opensourcetutor.com/2010/07/28/view-memory-brand-manufacturer-serial-number-in-linux/</link>
		<comments>http://www.opensourcetutor.com/2010/07/28/view-memory-brand-manufacturer-serial-number-in-linux/#comments</comments>
		<pubDate>Wed, 28 Jul 2010 04:59:25 +0000</pubDate>
		<dc:creator>salubrium</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[systems administration]]></category>

		<guid isPermaLink="false">http://www.opensourcetutor.com/2010/07/28/view-memory-brand-manufacturer-serial-number-in-linux/</guid>
		<description><![CDATA[Very simply.
sudo dmidecode &#8211;type 17                                                                   
This gives the following output:
# dmidecode 2.9
SMBIOS 2.4 present.
Handle 0&#215;1100, DMI type 17, 27 bytes
Memory Device
    ...]]></description>
			<content:encoded><![CDATA[<p>Very simply.</p>
<p>sudo dmidecode &#8211;type 17                                                                   </p>
<p>This gives the following output:</p>
<p># dmidecode 2.9<br />
SMBIOS 2.4 present.</p>
<p>Handle 0&#215;1100, DMI type 17, 27 bytes<br />
Memory Device<br />
        Array Handle: 0&#215;1000<br />
        Error Information Handle: Not Provided<br />
        Total Width: 64 bits<br />
        Data Width: 64 bits<br />
        Size: 2048 MB<br />
        Form Factor: DIMM<br />
        Set: None<br />
        Locator: DIMM_A<br />
        Bank Locator: Not Specified<br />
        Type: DDR<br />
        Type Detail: Synchronous<br />
        Speed: 667 MHz (1.5 ns)<br />
        Manufacturer: AD00000000000000<br />
        Serial Number: 00001016<br />
        Asset Tag: 000818<br />
        Part Number: HYMP125S64CP8-Y5  </p>
<p>Handle 0&#215;1101, DMI type 17, 27 bytes<br />
Memory Device<br />
        Array Handle: 0&#215;1000<br />
        Error Information Handle: Not Provided<br />
        Total Width: 64 bits<br />
        Data Width: 64 bits<br />
        Size: 1024 MB<br />
        Form Factor: DIMM<br />
        Set: None<br />
        Locator: DIMM_B<br />
        Bank Locator: Not Specified<br />
        Type: DDR<br />
        Type Detail: Synchronous<br />
        Speed: 667 MHz (1.5 ns)<br />
        Manufacturer: AD00000000000000<br />
        Serial Number: 00003160<br />
        Asset Tag: 410801<br />
        Part Number: HYMP112S64CP6-Y5 </p>
]]></content:encoded>
			<wfw:commentRss>http://www.opensourcetutor.com/2010/07/28/view-memory-brand-manufacturer-serial-number-in-linux/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Yakuake for Gnome</title>
		<link>http://www.opensourcetutor.com/2009/08/03/yakuake-for-gnome/</link>
		<comments>http://www.opensourcetutor.com/2009/08/03/yakuake-for-gnome/#comments</comments>
		<pubDate>Mon, 03 Aug 2009 00:53:29 +0000</pubDate>
		<dc:creator>salubrium</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[Open Source]]></category>
		<category><![CDATA[desktop shortcuts]]></category>
		<category><![CDATA[gnome]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[tilda]]></category>
		<category><![CDATA[yakuake]]></category>

		<guid isPermaLink="false">http://www.opensourcetutor.com/?p=240</guid>
		<description><![CDATA[



I have previously written about Tilda, a gnome replacement for Yakuake. I had some issues with Tilda so I came to have a nice relationship with Yakauke. It&#8217;s important to note though, that there is another reasonable alternative to both Tilda and Yakuake and it&#8217;s called Guake.
Guake has some of the basic features of Yakuake but is still lacking in a few things. The main ones for me are:

Yakauke allows you to choose terminal width / Guake takes up fullscreen width. The advantage of this for me is that I ...]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9469051832075629";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//2007-05-22: opensourcetutor.com
google_ad_channel = "3549963802";
google_color_border = "FFF";
google_color_bg = "FFF";
google_color_link = "333";
google_color_text = "CCCCCC";
google_color_url = "999999";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
I have <a href="http://www.opensourcetutor.com/2007/06/11/tilda-the-yakuake-terminal-equivalent-for-gnome/">previously written about Tilda</a>, a gnome replacement for <a href="http://yakuake.kde.org/">Yakuake</a>. I had some issues with Tilda so I came to have a nice relationship with Yakauke. It&#8217;s important to note though, that there is another reasonable alternative to both Tilda and Yakuake and it&#8217;s called <a href="http://trac.guake-terminal.org/">Guake</a>.</p>
<p>Guake has some of the basic features of Yakuake but is still lacking in a few things. The main ones for me are:</p>
<ul>
<li>Yakauke allows you to choose terminal width / Guake takes up fullscreen width. The advantage of this for me is that I can sit Yakuake on the right side of the page and read a web page as a reference if I am programming in vim or copying instructions for something.</li>
<li>Yakuake allows you to Alt+Shift+Left/Right to increase / decrease terminal width size on the fly. So if you can&#8217;t quite read the text you are referencing, it&#8217;s easy to shrink the terminal slightly so you can.</li>
</ul>
<p>Still, if you are looking for a nice Gnome-based Quake style terminal window, Guake is a good alternative to both Tilda and Yakuake.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.opensourcetutor.com/2009/08/03/yakuake-for-gnome/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Bash command to determine multiple logins sorted by user with the most logins</title>
		<link>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/</link>
		<comments>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/#comments</comments>
		<pubDate>Thu, 29 May 2008 01:41:09 +0000</pubDate>
		<dc:creator>salubrium</dc:creator>
				<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[awk]]></category>
		<category><![CDATA[Bash]]></category>
		<category><![CDATA[hp-ux]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[maxusers]]></category>
		<category><![CDATA[one-liner]]></category>

		<guid isPermaLink="false">http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/</guid>
		<description><![CDATA[



Here &#8217;tis
w &#124; awk &#8216;{a[$1]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; &#124; sort -rn &#124; head
stumbled on this issue with a HP-UX server we run where the maxusers kernel paramater is set to 600 (512 by default). To change this setting, requires a reboot of the server (something not easily achievable at midday with 600 users logged in). You can change kernel parameters via SAM in HP-UX
This is a slight modification of the 1 liner that sorts your bash history by commands used:
history &#124; awk &#8216;{a[$2]++}END{for(i in a){print a[i] &#8221; ...]]></description>
			<content:encoded><![CDATA[<p><script type="text/javascript"><!--
google_ad_client = "pub-9469051832075629";
google_ad_width = 468;
google_ad_height = 60;
google_ad_format = "468x60_as";
google_ad_type = "text";
//2007-05-22: opensourcetutor.com
google_ad_channel = "3549963802";
google_color_border = "FFF";
google_color_bg = "FFF";
google_color_link = "333";
google_color_text = "CCCCCC";
google_color_url = "999999";
//-->
</script>
<script type="text/javascript"
  src="http://pagead2.googlesyndication.com/pagead/show_ads.js">
</script><br />
Here &#8217;tis</p>
<blockquote><p>w | awk &#8216;{a[$1]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; | sort -rn | head</p></blockquote>
<p>stumbled on this issue with a HP-UX server we run where the maxusers kernel paramater is set to 600 (512 by default). To change this setting, requires a reboot of the server (something not easily achievable at midday with 600 users logged in). You can change kernel parameters via SAM in HP-UX</p>
<p>This is a slight modification of the 1 liner that sorts your bash history by commands used:</p>
<blockquote><p>history | awk &#8216;{a[$2]++}END{for(i in a){print a[i] &#8221; &#8221; i}}&#8217; | sort -rn | head</p></blockquote>
<p>Here&#8217;s some examples of my own from 2 machines:</p>
<p>235 ll<br />163 cd<br />149 grep<br />37 vi<br />32 for<br />31 du<br />26 rm<br />23 tail<br />21 htop<br />20 /etc/init.d/httpd</p>
<p>Here&#8217;s my home machine (I use pkill when I login to the same user desktop remotely via NX to kill evolution in the console session) :</p>
<p>109 ll<br />42 sudo<br />35 locate<br />35 cd<br />24 pkill<br />17 more<br />15 vi<br />15 unison<br />15 ssh<br />14 echo</p>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/bash" rel="tag">bash</a>, <a class="performancingtags" href="http://technorati.com/tag/hp-ux" rel="tag">hp-ux</a>, <a class="performancingtags" href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a class="performancingtags" href="http://technorati.com/tag/one-liner" rel="tag">one-liner</a>, <a class="performancingtags" href="http://technorati.com/tag/awk" rel="tag">awk</a>, <a class="performancingtags" href="http://technorati.com/tag/maxusers" rel="tag">maxusers</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.opensourcetutor.com/2008/05/29/bash-command-to-determine-multiple-logins-sorted-by-user-with-the-most-logins/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to schedule Linux to mute speaker volume overnight</title>
		<link>http://www.opensourcetutor.com/2008/04/28/how-to-schedule-linux-to-mute-speaker-volume-overnight/</link>
		<comments>http://www.opensourcetutor.com/2008/04/28/how-to-schedule-linux-to-mute-speaker-volume-overnight/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 06:35:46 +0000</pubDate>
		<dc:creator>salubrium</dc:creator>
				<category><![CDATA[Bash]]></category>
		<category><![CDATA[Linux Administration]]></category>
		<category><![CDATA[automation]]></category>
		<category><![CDATA[crontab]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[ubuntu]]></category>
		<category><![CDATA[volume]]></category>

		<guid isPermaLink="false">http://www.opensourcetutor.com/2008/04/28/how-to-schedule-linux-to-mute-speaker-volume-overnight/</guid>
		<description><![CDATA[
Here&#8217;s a simple method of automatically muting your volume overnight and resetting it in the morning. This is especially good for those who use softphones, skype or an IM client that have sound alerts output to speakers.
We are going to use three command line tools for this: aumix, which and cron. We are also only going to set things up so the commands are run under the user account, rather than as root as cron used incorrectly can open up some security issues.
so, to get started try and run:
:~$ aumix
and ...]]></description>
			<content:encoded><![CDATA[<p><!--adsense#widelinks--><br />
Here&#8217;s a simple method of automatically muting your volume overnight and resetting it in the morning. This is especially good for those who use softphones, skype or an IM client that have sound alerts output to speakers.</p>
<p>We are going to use three command line tools for this: aumix, which and cron. We are also only going to set things up so the commands are run under the user account, rather than as root as cron used incorrectly can open up some security issues.</p>
<p>so, to get started try and run:</p>
<blockquote><p>:~$ aumix</p></blockquote>
<p>and if it&#8217;s not there, try</p>
<blockquote><p>:~$ sudo apt-get install aumix</p></blockquote>
<p> for Debian / Ubuntu or <br />
<blockquote>:~$ yum install aumix</p></blockquote>
<p> for Redhat / Centos / Fedora</p>
<p>Now that we have aumix installed, we want to find out the path to the executable as Cron doesn&#8217;t always use our environmental variables to find executables on our path. So type:</p>
<blockquote><p>:~$ which aumix<br />/usr/bin/aumix </p></blockquote>
<p>We can see it&#8217;s in /usr/bin/aumix</p>
<p>So, kick-off your music player and try playing some music or other audio then run the following commands:</p>
<blockquote><p>:~$ aumix -v 0</p></blockquote>
<p>  then<br />
<blockquote>:~$ aumix -v 100</p></blockquote>
<p>The first command should have dropped your volume down to 0% and the second command should have taken it back to 100%. Now that we have that working, let&#8217;s add it to cron. For myself, I don&#8217;t want to be disturbed between 11pm and 7am, so following cron&#8217;s options, we have</p>
<p>minute-hour-day-month-weekday-command &#8211; and we use 24 hour format. An asterisk means run at every instance of that time period, so:<br /> * * * * * would mean every minute of every day, every month and<br /> 0 0 * * * would mean at midnight every day.</p>
<p>For myself, I want the 23rd hour of every day, every month for the volume to be set down and I want the 7th hour of every day for the volume to be returned to 90%. So we add this to our crontab:</p>
<blockquote><p>0 23 * * * /usr/bin/aumix -v 0<br />00 07 * * * /usr/bin/aumix -v 90</p></blockquote>
<p>To do so as a user, we use:</p>
<blockquote><p>:~$ crontab -e</p></blockquote>
<p>Now if your default editor is vim / vi and you have never used it before, you will need to learn a little vi before we get started. When the editor opens, type <i> to enter insert mode allowing you to copy and paste the above code and modify for your needs, when you are finished editing, press esc then VV to save the file and exit.</p>
<p>If the above vi / vim is too difficult, then you can make nano your default editor (if it&#8217;s not already)</p>
<p></i><br />
<blockquote><i>:~$ EDITOR=/usr/bin/nano</i></p></blockquote>
<p><i> and then run <br /></i><br />
<blockquote><i>:~$ crontab -e</i></p></blockquote>
<p><i></p>
<p>Nano is a simplistic editor with the basic instructions displayed at the bottom of the screen.</p>
<p>So, there you have the very basics of Cron administration &#8211; ie: the Task Scheduler of Linux and how to adjust your volume via the command line.</p>
<p>If you are looking for a GUI tool for Cron Administration, look no further than gnome-schedule:</p>
<p></i><br />
<blockquote><i>:~$ sudo apt-get install gnome-schedule</i></p></blockquote>
<p><i></p>
<p>here&#8217;s our beloved screenshot:</p>
<p></i>
<div align="center"><img style="max-width: 800px;" src="http://www.opensourcetutor.com/wp-content/uploads/2008/04/gnome-schedule.png" /></div>
<p>for raising and lowering the volume.</p>
<p>Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/volume" rel="tag">volume</a>, <a class="performancingtags" href="http://technorati.com/tag/linux" rel="tag">linux</a>, <a class="performancingtags" href="http://technorati.com/tag/crontab" rel="tag">crontab</a>, <a class="performancingtags" href="http://technorati.com/tag/automation" rel="tag">automation</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.opensourcetutor.com/2008/04/28/how-to-schedule-linux-to-mute-speaker-volume-overnight/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
