<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<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/"
	>

<channel>
	<title>command-line &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://en.wordpress.com/tag/command-line/</link>
	<description>Feed of posts on WordPress.com tagged "command-line"</description>
	<pubDate>Sat, 28 Nov 2009 07:45:46 +0000</pubDate>

	<generator>http://en.wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Name a file based on computer date and time]]></title>
<link>http://preempalverec.wordpress.com/2009/11/27/name-a-file-based-on-computer-date-and-time/</link>
<pubDate>Fri, 27 Nov 2009 14:06:24 +0000</pubDate>
<dc:creator>preempalverec</dc:creator>
<guid>http://preempalverec.wordpress.com/2009/11/27/name-a-file-based-on-computer-date-and-time/</guid>
<description><![CDATA[Problem: we need a Windows batch command file to backup some information into a file and that file m]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p><strong>Problem: </strong>we need a Windows batch command file to backup some information into a file and that file must be named based on the date and time of the computer.</p>
<p><strong>Solution</strong>:  a script like this should do the required task</p>
<p>rem perform de backup tasks and save the resulting file on a directory, for example e:\backups</p>
<p>rem with a any file name, for example backup.bkf</p>
<p>rem change the current directory to the same where the backup file was created</p>
<p>cd e:\backups</p>
<p>rem proceed to rename using the for function</p>
<p>for /f &#8220;tokens=1-6 delims=/: &#8221; %%d in (&#8220;%date%:%time%&#8221;) do rename &#8220;e:\backups\backup.bkf&#8221; ANYTEXT%%d_%%e_%%f_%%g-%%hh%%i.bkf</p>
<p>The command line above can be read as follows:</p>
<p><em>for the text on %date:%time% split it on tokens taking the characters / or : as delimiters. Use only the tokens 1 to 6 and assign them to letters beginning from d. Finally, rename the file “e:\backups\backup.bkf” with the name formed by the tokens %d,%e,%f%,%g,%h and %i.</em></p>
<p>The resultant file name can have additional characters. In my example, I am appending the ANYTEXT string to the file name, using the ‘-‘ character to separate date and time on the file name, and including an ‘h’ to separate hour and minutes.</p>
<p>Some examples on the Internet shows the same command but using the tokens 1 to 5. It is important to see how the date and time are actually displayed on the server you are going to run de script in order to choose the right number of tokens. To do that, in a command line you can type date or time and then press ENTER. If the date is not showing the first three letters of the day (for example, Mon for Monday),  you can use the tokens 1 to 5. In my case, my server was showing those three characters before the date and I needed tokens 1 to 6.</p>
<p>Finally, you can run the for command directly on the Windows command line in order to test the rename procedure and being sure that the file is named as you want. However, please take into account that on the command line you don´t need to use the double %% before the token letters. For the command above to be run on the Windows Command line directly, the syntax should be:</p>
<p>for /f &#8220;tokens=1-6 delims=/: &#8221; %d in (&#8220;%date%:%time%&#8221;) do rename &#8220;e:\backups\backup.bkf&#8221; ANYTEXT%d_%e_%f_%g-%hh%i.bkf</p>
<p>&#160;</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Enabling journaled quota on filesystems on Debian Lenny]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/25/enabling-journaled-quota-on-filesystems-on-debian-lenny/</link>
<pubDate>Wed, 25 Nov 2009 22:47:08 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/25/enabling-journaled-quota-on-filesystems-on-debian-lenny/</guid>
<description><![CDATA[Enabling quota for users may be useful to limit the use of space disk. This works on ext3 and ext4 f]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Enabling <b>quota</b> for users may be useful to limit the use of space disk. <br />This works on ext3 and ext4 filesystems. With <b>journaled quota</b>, you do not need to issue a <b>quotacheck</b> command even if your server has been unproperly halted.</p>
<p>Install the appropriate Debian packages :</p>
<p><strong>root@localhost:~# apt-get install quota quotatool</strong></p>
<p>Once installed, please modify your <b>/etc/fstab</b> to enable <b>journaled quota</b> on your selected partition : <br />Add the following line to the appropriate partition :</p>
<p><b><span class="system">usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0</span></b></p>
<p>Once added, please run the following commands : <br /><b><br /></b><strong>root@localhost:~#</strong><b> touch /aquota.user /aquota.group<br />  </b><strong>root@localhost:~#</strong><b> chmod 600 /aquota.*<br /></b><strong>root@localhost:~# </strong><b>mount -o remount /</b></p>
<p>If you remount your filesystem, it prevents you from rebooting the server.</p>
<p>Please verify that <b>journaled quota</b> is enabled : </p>
<p><strong>root@localhost:~#</strong><b> quotaon -vug /your_partition</b><br /><strong>root@localhost:~#</strong><b> quotacheck -vugm /your_partition</b></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=54011fae-f030-856c-be29-adbc60c110a9" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA['java.lang.NoClassDefFoundError' in terminal mode]]></title>
<link>http://aptxevo.wordpress.com/2009/11/25/java-lang-noclassdeffounderror-in-terminal-mode/</link>
<pubDate>Wed, 25 Nov 2009 17:17:44 +0000</pubDate>
<dc:creator>cmzmasek</dc:creator>
<guid>http://aptxevo.wordpress.com/2009/11/25/java-lang-noclassdeffounderror-in-terminal-mode/</guid>
<description><![CDATA[If you are getting a &#8216;java.lang.NoClassDefFoundError&#8217; you most likely forgot the &#8216;]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you are getting a &#8216;java.lang.NoClassDefFoundError&#8217; you most likely forgot the &#8216;-cp&#8217; (classpath) option or the file forester.jar cannot be found where your &#8216;-cp&#8217; points.</p>
<p>If you are in the same directory as the forester.jar you need to type:</p>
<pre>% java -cp forester.jar org.forester.archaeopteryx.Archaeopteryx</pre>
<p>If you are in a different directory than the jar file (the usual case), it is:</p>
<pre>% java -cp /path/to/forester.jar org.forester.archaeopteryx.Archaeopteryx</pre>
<p>In Windows, you need to use \ instead of /.</p>
<p>If you want to use a configuration file (<a title="example" href="http://www.phylosoft.org/forester/download/_aptx_configuration_file">example</a>), you need to add:</p>
<pre>-c path/to/_aptx_configuration_file</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[LSNED 18: What software is installed on this PC?]]></title>
<link>http://yaytay.wordpress.com/2009/11/25/lsned-18-what-software-is-installed-on-this-pc/</link>
<pubDate>Wed, 25 Nov 2009 07:18:14 +0000</pubDate>
<dc:creator>yaytay</dc:creator>
<guid>http://yaytay.wordpress.com/2009/11/25/lsned-18-what-software-is-installed-on-this-pc/</guid>
<description><![CDATA[There are lots of very expensive tools for finding out what software is installed on a PC, in many c]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>There are lots of very expensive tools for finding out what software is installed on a PC, in many cases they go to extraordinary lengths to establish this and still get it wrong.<br />
Well, here&#8217;s an incredibly quick and simple way to find out:</p>
<pre class="brush: plain;">
reg query &#34;HKLM\Software\Microsoft\Windows\CurrentVersion\Uninstall&#34; /v &#34;DisplayName&#34; /s &#124; find &#34;Display&#34;
</pre>
<p>This will only report the things found in the Add/Remove programs dialog (sometimes in more detail than they are listed there), but I&#8217;ve seen commercial tools miss stuff that this finds (which is says more about those tools than anything else).</p>
<p>Being a standard registry command, if you have the rights you can run it on all the machines in your domain without moving.<br />
And if typing that in is too hard let me know and I&#8217;ll post the tool I wrote before I learned <a href="http://yaytay.wordpress.com/2009/11/24/lsned-17-searching-the-registry/">this</a>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[LSNED 17: Searching the registry]]></title>
<link>http://yaytay.wordpress.com/2009/11/24/lsned-17-searching-the-registry/</link>
<pubDate>Tue, 24 Nov 2009 09:13:27 +0000</pubDate>
<dc:creator>yaytay</dc:creator>
<guid>http://yaytay.wordpress.com/2009/11/24/lsned-17-searching-the-registry/</guid>
<description><![CDATA[In the old days (Windows 2000, I think) Microsoft used to have a command line tool called regfind (I]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>In the old days (Windows 2000, I think) Microsoft used to have a command line tool called regfind (I think) that would search the entire registry and print out any key or value that contained a search term in each the name or the data.<br />
It was very useful, and then they replaced it with the much less useful &#8220;reg.exe&#8221;.</p>
<p>I don&#8217;t know whether reg.exe has become more capable, or I just didn&#8217;t look hard enough, but reg.exe does have similar functionality to regfind.exe.<br />
The magic incantation is:<br />
reg query HKLM /s /f </p>
<p>Where reg.exe is still deficient is that you have to specify a root key, so searching the entire registry requires multiple runs.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to Execute Previous Terminal Commands Without Retyping Them]]></title>
<link>http://ubuntugenius.wordpress.com/2009/11/22/how-to-execute-previous-terminal-commands-without-retyping-them/</link>
<pubDate>Sun, 22 Nov 2009 05:51:20 +0000</pubDate>
<dc:creator>ubuntugenius</dc:creator>
<guid>http://ubuntugenius.wordpress.com/2009/11/22/how-to-execute-previous-terminal-commands-without-retyping-them/</guid>
<description><![CDATA[For those who don&#8217;t know this, you can use you UP arrow on your keyboard to cycle through prev]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>For those who don&#8217;t know this, you can use you <strong><span style="color:#800000;">UP</span></strong> arrow on your keyboard to <strong><span style="color:#008080;">cycle through previous commands you&#8217;ve entered in the terminal</span></strong>. Your &#8220;<em>bash</em> history&#8221; records them, and you&#8217;ll be presented with them in the order of last used first. If you go too far, use your <strong><span style="color:#800000;">DOWN</span></strong> arrow to find the command you passed. Similarly, if you decide to type in a new command, just use the <strong><span style="color:#800000;">DOWN</span></strong> arrow to get past the previous entries and back to an empty prompt.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA["VirtualBox can't operate in VMX root mode" Error Starting VM]]></title>
<link>http://ubuntugenius.wordpress.com/2009/11/22/virtualbox-cant-operate-in-vmx-root-mode-error-starting-vm/</link>
<pubDate>Sat, 21 Nov 2009 17:55:32 +0000</pubDate>
<dc:creator>ubuntugenius</dc:creator>
<guid>http://ubuntugenius.wordpress.com/2009/11/22/virtualbox-cant-operate-in-vmx-root-mode-error-starting-vm/</guid>
<description><![CDATA[If VirtualBox opens fine, but when you try to start a virtual machine (VM) you get the following err]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If <strong><span style="color:#800000;">VirtualBox</span></strong> opens fine, but when you try to start a <strong>virtual machine</strong> (<em>VM</em>) you get the following error:</p>
<p><strong><span style="color:#0000ff;">Failed to start the virtual machine Windows XP.</span><br />
<span style="color:#333399;">VirtualBox can&#8217;t operate in VMX root mode. Please disable the KVM kernel extension, recompile your kernel and reboot (VERR_VMX_IN_VMX_ROOT_MODE).</span></strong></p>
<p>&#8230; it means another virtualisation package &#8211; <strong><span style="color:#3366ff;">kvm</span></strong> &#8211; is interfering with <strong><span style="color:#800000;">VirtualBox</span></strong>. <strong><span style="color:#3366ff;">kvm</span></strong> isn&#8217;t installed on <strong><span style="color:#993300;">Ubuntu</span></strong> by default, so you probably installed <strong><span style="color:#3366ff;">qemu</span></strong>, the popular open-source emulator.</p>
<p>A quick fix is to stop <strong><span style="color:#3366ff;">kvm</span></strong> via the terminal:</p>
<p><strong><span style="color:#3366ff;">sudo /etc/init.d/kvm stop</span></strong></p>
<p>To <strong>stop this happening completely</strong>, mark the following packages for <strong>complete removal</strong> in Synaptic if they&#8217;re installed: <strong><span style="color:#3366ff;">kvm</span></strong>, <strong><span style="color:#3366ff;">qemu</span></strong>, <strong><span style="color:#3366ff;">qemu-kvm</span></strong> &#38; <strong><span style="color:#3366ff;">qemu-launcher</span></strong>. Or you can do it via the terminal, and ignore errors regarding packages that weren&#8217;t installed (so can&#8217;t be uninstalled):</p>
<p><strong><span style="color:#3366ff;">sudo apt-get remove </span></strong><strong><span style="color:#3366ff;">kvm </span></strong><strong><span style="color:#3366ff;">qemu</span></strong> <strong><span style="color:#3366ff;">qemu-kvm </span></strong><strong><span style="color:#3366ff;">qemu-launcher</span></strong></p>
<p>You should now be able to start your <em>VM</em>, without having to close and restart <strong><span style="color:#800000;">VirtualBox</span></strong>.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Three Quick Linux Tips]]></title>
<link>http://htipe.wordpress.com/2009/11/21/three-quick-linux-tips/</link>
<pubDate>Sat, 21 Nov 2009 17:32:18 +0000</pubDate>
<dc:creator>Zero Signal</dc:creator>
<guid>http://htipe.wordpress.com/2009/11/21/three-quick-linux-tips/</guid>
<description><![CDATA[In this post I&#8217;m going to point you to three quick and useful Linux tips from three different ]]></description>
<content:encoded><![CDATA[In this post I&#8217;m going to point you to three quick and useful Linux tips from three different ]]></content:encoded>
</item>
<item>
<title><![CDATA[Creating a Debian package from a Perl module]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/17/creating-a-debian-package-from-a-perl-module/</link>
<pubDate>Tue, 17 Nov 2009 19:59:36 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/17/creating-a-debian-package-from-a-perl-module/</guid>
<description><![CDATA[The most used Perl modules are available as Debian packages. However,  Debian does not always provid]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The most used Perl modules are available as Debian packages.<br />
However,  Debian does not always provide the latest version we need and not all the existing <strong>CPAN</strong> modules are available.<br />
At <strong>CPAN</strong>, we can find any module for almost everything and we can manually install it.<br />
Debian Perl packaging Team has created a dedicated tool for Debian users : <strong> dh-make-perl.</strong><br />
To install it :</p>
<p><strong>root@localhost:~# apt-get install devscripts dh-make-perl</strong></p>
<p>Make sure the command is available :</p>
<p><strong>fool@localhost:~$ which dh-make-perl</strong></p>
<p>I decided to install the Perl module <strong>System2</strong> :</p>
<p><strong>fool@localhost:~$dh-make-perl &#8211;build &#8211;cpan System2</strong></p>
<p>The program <strong>dh-make-perl</strong> will download directly from a <strong>CPAN</strong> mirror the module System2, check for any dependencies and create the corresponding Debian package.</p>
<p>The freshly created package is  :</p>
<p><strong>$HOME/.cpan/build/libsystem2-perl_0.84-1_all.deb</strong></p>
<p><strong> </strong>Install the package  as root :<strong></strong></p>
<p><strong>dpkg &#8211;install </strong> <strong>$HOME/.cpan/build/libsystem2-perl_0.84-1_all.deb</strong></p>
<p><strong>dpkg -l &#124;grep -i system2</strong></p>
<p><strong><br />
ii  libsystem2-perl                           0.84-1                     like system(), but with access to STDOUT and STDERR.</strong></p>
<p>Check now that the module is available through <strong>perl</strong> and <strong>perldoc</strong> commands :</p>
<p><strong>fool@localhost:~$perl -MSystem2 -e1</strong></p>
<p><strong>fool@localhost:~$perldoc System2<br />
</strong><br />
For more information about Perl modules :</p>
<p><a href="http://www.cpan.org/"><strong>http://www.cpan.org</strong></a></p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=31cf9bff-a8ce-8df2-8a80-fa4da9074428" alt="" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Data Verification of Folders &amp; Discs with MD5 Checksums in Ubuntu]]></title>
<link>http://ubuntugenius.wordpress.com/2009/11/17/data-verification-of-folders-discs-with-md5-checksums-in-ubuntu/</link>
<pubDate>Tue, 17 Nov 2009 10:02:09 +0000</pubDate>
<dc:creator>ubuntugenius</dc:creator>
<guid>http://ubuntugenius.wordpress.com/2009/11/17/data-verification-of-folders-discs-with-md5-checksums-in-ubuntu/</guid>
<description><![CDATA[If you&#8217;re unfamiliar with MD5 checksums (or MD5sums for short), they are simply a string of nu]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>If you&#8217;re unfamiliar with <strong><span style="color:#008000;">MD5 checksums</span></strong> (or <strong>MD5sums</strong> for short), they are simply a string of numbers (<em>&#8220;<strong>hashes</strong>&#8220;</em>) generated when each file is scanned, to be used to later <strong><span style="color:#008000;">verify the integrity of the data</span></strong>. You may have noted when downloading Linux .<strong>iso</strong> images or similar that there either was a text file with it &#8211; usually with the same suffix as the main file, but with perhaps an <strong>.md5sums</strong> extension &#8211; or the actual hash below the download link.</p>
<p>Also, you probably know you can check your <strong><span style="color:#993300;">Ubuntu</span></strong> CD for defects while at the boot menu, but since that just looks to an <strong>md5sum.txt</strong> file (most common name on Linux live CDs), you can also do so in Ubuntu via the terminal. So, for example, if you&#8217;ve burned a copy of the latest Ubuntu (or other Linux distro) live CD for a friend, you can simply open a terminal and check it without having to reboot.</p>
<p>But the most important use of the <strong><span style="color:#3366ff;">md5sum</span></strong> command is to <strong>create data verification for folders</strong> on your drive, as well as<strong> data CDs and DVDs</strong>, and even <strong>video DVDs</strong>. If you just wanted to periodically make sure no files are corrupt in a given folder (or whole drive if you want), this is the way to go. If you have a whole bunch of things in a folder you want to burn to a data disc, then the checksum file you create will let you check the disc for defects.</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span></p>
<p>So when you want <span style="color:#ff0000;"><strong>to </strong><strong>create the checksums</strong></span>, <strong><a href="http://ubuntugenius.wordpress.com/2009/08/30/what-does-open-a-terminal-in-the-folder-mean/">open a terminal in that folder</a></strong> and enter the following:</p>
<p><strong><span style="color:#3366ff;">find -type f -exec md5sum &#8220;{}&#8221; \; &#62; md5sum.txt</span></strong></p>
<p><span style="text-decoration:underline;">Note that this will also create a hash for the file itself</span>, ie:  <strong>md5sum.txt</strong>, which will produce an error when checked, since it was generated while the file was still being created:</p>
<p><strong><span style="color:#800000;">md5sum: WARNING: 1 of 103 computed checksums did NOT match</span></strong></p>
<p>When you scroll up the terminal to see the cause of the error, you&#8217;ll find:</p>
<p><strong><span style="color:#800000;">./md5sum.txt: FAILED </span></strong></p>
<p>You will need to manually edit out the line for <strong>md5sum.txt</strong>, and if the file is really large, just hit <strong>Ctrl+F</strong> and search for <strong><em>md5</em></strong>, and it will take you to the line you need to delete.</p>
<p>Once that&#8217;s done, you can verify the folder/drive any time you wish. With discs, it isn&#8217;t limited to data, or rather since the<strong> .vob</strong> files etc of a DVD <span style="text-decoration:underline;">are</span> data, you can generate the <strong>md5sum.txt</strong> in the parent folder of the title (ie: the one <strong><em>VIDEO_TS</em></strong> resides in) and check movies as well as data backups.</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p><span style="color:#ff0000;"><strong>To </strong><strong>check a folder</strong></span>, open a terminal there and enter:</p>
<p><strong><span style="color:#3366ff;">md5sum -c md5sum.txt</span></strong></p>
<p><span style="color:#ff0000;"><strong>To </strong><strong>check a disc</strong></span> that has that file, including the likes of the Ubuntu CD, you&#8217;ll need the terminal pointing at the disc. But rather than open a folder window and choose <strong><em>Open in Terminal</em></strong> from the context menu, you can do that via any open terminal and incorporate the checking command above with:</p>
<p><strong><span style="color:#3366ff;">cd /media/cdrom0 &#38;&#38; md5sum -c md5sum.txt</span></strong></p>
<p>Occasionally systems don&#8217;t have <strong><em>cdrom0</em></strong> as the device name for the disc drive, so when you open a terminal there the other way, make note of the device name and alter the last command accordingly.</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p><strong><span style="color:#ff0000;">When the check is over</span></strong>, if there are any errors, it will tell you how many failed the test out of how many listed. In the following example, you are actually presented with two errors at the end, the first complaining of a missing file, the other reporting one that seems to be corrupt:</p>
<p><span style="color:#800000;"><strong>md5sum: WARNING: 1 of 102 listed files could not be read<br />
<span style="color:#993366;">md5sum: WARNING: 1 of 101 computed checksums did NOT match</span></strong></span></p>
<p>You can then scroll up the terminal if need be and find those that didn&#8217;t pass:</p>
<p><span style="color:#800000;"><strong>md5sum: ./Wallpaper01.jpg: No such file or directory<br />
./Wallpaper01.jpg: FAILED open or read</strong></span><span style="color:#993366;"><strong><br />
./Wallpaper002.jpg.jpg: FAILED </strong></span></p>
<p>In this example, <em>&#8220;<strong>Wallpaper01.jpg</strong>&#8220;</em> is seen as &#8220;missing&#8221;, because it was in fact renamed to <em>&#8220;<strong>Wallpaper001.jpg</strong>&#8220;</em> (to keep in line with the 3-digit numbering of the rest of the files) <strong><span style="text-decoration:underline;">after</span></strong> the checksum was created (so <em>&#8220;<strong>Wallpaper001.jpg</strong>&#8220;</em> is totally ignored, since there was no hash created for it, and <em>&#8220;<strong>Wallpaper01.jpg</strong>&#8220;</em> is seen as missing, since there is no longer a file of that name). <em>&#8220;<strong>Wallpaper002.jpg</strong>&#8220;</em> is probably corrupt, though not all files that do not pass the test fail to open (but, generally, the case is that the file is corrupt, and the larger the file, the  more chance there is of that).</p>
<p>Otherwise, if all you see is the command prompt with the last file above it with an <em><strong>OK</strong></em> next to it, then all is fine:</p>
<p><strong><span style="color:#800000;">./Wallpaper100.jpg: OK</span></strong></p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p>To make all this easier, <strong><a href="http://ubuntugenius.wordpress.com/2009/08/31/custom-terminal-shortcuts-via-bash-aliases/"><span style="color:#ff0000;">make command aliases</span></a></strong>, like <strong><span style="color:#3366ff;">make5</span></strong> (to<strong> generate an md5sum.txt</strong> file), <strong><span style="color:#3366ff;">5</span></strong> (to <strong>check a folder</strong>) and <strong><span style="color:#3366ff;">cd5</span></strong> (to <strong>check a disc</strong> that can be verified). This will save you memorising and typing long commands, or even copying and pasting from a text file of commands you&#8217;ve probably got (if you&#8217;re clever).</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p><span style="color:#ff0000;"><strong>To </strong><strong>check a disc image or other file you&#8217;re downloading</strong></span> that has a checksum listed, you can <strong><span style="color:#000000;">generate a checksum</span></strong>, and simply <strong>compare the output</strong> with what is listed on the website:</p>
<p><strong><span style="color:#3366ff;">md5sum name_of_the_image.iso</span></strong></p>
<p>Obviously, you&#8217;ll need to replace the name in the example with the actual name of the file, but to save typing it if it is long, you can just enter <strong><span style="color:#3366ff;">md5sum</span></strong> (followed by a space), drag the downloaded file to the terminal and drop it there, then hit Enter (though you can, of course, just copy the file&#8217;s name as well). Then, as I said, simply compare the numbers in the terminal and website.</p>
<p>Now, if you&#8217;re downloading a bunch of stuff, all with checksums supplied, you can create your own master checksum file, which will check them all in one go when you&#8217;re ready. Syntax is very important, so the lines should look like this:</p>
<p><span style="color:#008000;"><strong>8790491bfa9d00f283ed9dd2d77b3906 *ubuntu-9.10-desktop-i386.iso<br />
3faa345d298deec3854e0e02410973dc *ubuntu-9.10-alternate-i386.iso<br />
dc51c1d7e3e173dcab4e0b9ad2be2bbf *ubuntu-9.10-desktop-amd64.iso</strong></span></p>
<p>In this example, Ubuntu CDs are used, but they can be anything, as long as you lay it out like that. You can name the file what you want, but if you want to stick with tradition, and to make it easier to check  (via the command above, or its alias <strong><span style="color:#3366ff;">5</span></strong>), name it <strong>md5sum.txt</strong>. And you can use this before you get all the files, as when you run the check, it will just tell you 2 out 0f 3 couldn&#8217;t be found (and you&#8217;ll see the one you did download listed, hopefully with an <em>OK</em> next to it).</p>
<p>If you name the checksum file something different, or in the case of the Ubuntu discs downloaded a master checksum file for all images, and it has a name like <strong>Ubuntu 9.10.MD5Sum</strong> (though that&#8217;s the name I actually gave it), it doesn&#8217;t matter. You can just enter <strong><span style="color:#3366ff;">md5sum -c</span></strong> (followed by a space), then either type the name of the file, or drag the file to the terminal. Note you can also do this with the alias <strong><span style="color:#3366ff;">5</span></strong> &#8211; it will complain it didn&#8217;t find <strong>md5sum.txt</strong>, but then go on to verify the files recorded in <strong>Ubuntu 9.10.MD5Sum</strong> (or whatever your file is called). Of course, you could just rename the checksum file to <strong>md5sum.txt</strong>, but as you can see, you don&#8217;t really need to.</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p>When you&#8217;re going to <strong><span style="color:#ff0000;">backup a folder to DVD</span></strong>, <strong>always run a check</strong> on it first. That way, if you&#8217;ve done something like renamed a bunch of files after the <strong>md5sum.txt</strong> file was created, you&#8217;ll know before burning a disc that will always come up with those &#8220;errors&#8221;. You can then either generate new checksums, or open <strong>md5sum.txt</strong> and replace the old names with the new ones (renaming files does not alter their checksum hashes, so you do not need to generate new ones for them).</p>
<p style="text-align:center;"><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><span style="color:#800000;">∞</span></strong></strong><strong><strong>∞</strong></strong><strong><strong><span style="color:#800000;">∞</span></strong></strong>θ<strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ</strong><strong><span style="color:#800000;">θ</span></strong><strong>θ<span style="color:#800000;">∞</span><strong><strong>∞</strong></strong><strong><strong><span style="color:#008000;"><span style="color:#800000;">∞</span><span style="color:#800080;">•</span></span></strong></strong></strong></strong></span><span style="color:#800080;"><strong><strong><strong><strong><span style="color:#008000;"></span></strong></strong></strong></strong></span></p>
<p>So, hopefully that&#8217;s all you need to get you going in setting up some data verification, which comes in handy when wanting to make sure all the data on a DVD is valid before passing it on, or deleting the copies off your hard drive if archiving. And now that you know what those hashes or <strong>.md5</strong> files are on websites, make sure you grab them, so you can verify the integrity of your downloads. And if you set up those aliases, all of this becomes even simpler, as those names are short and easy to remember.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Useful Linux Commands]]></title>
<link>http://dailyuse.wordpress.com/2009/11/16/useful-linux-commands/</link>
<pubDate>Mon, 16 Nov 2009 14:56:00 +0000</pubDate>
<dc:creator>danutzdobrescu</dc:creator>
<guid>http://dailyuse.wordpress.com/2009/11/16/useful-linux-commands/</guid>
<description><![CDATA[Here i&#8217;ll write all the command that seemed useful to me.. so let&#8217;s start with the first]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><div>
<p>Here i&#8217;ll write all the command that seemed useful to me.. so let&#8217;s start with the first one which isn&#8217;t by far the most important <img src='http://s.wordpress.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>1. Run HD Videos on a slow processor:<br /><code>mplayer -framedrop -vfm ffmpeg -lavdopts lowres=1:fast:skiploopfilter=all</p>
<p></code>2. Search for the biggest 10 (or n) files in a directory:<br /><code>du -xk &#124; sort -n &#124; tail -20</code></p>
<pre>3. Convert some images to a single multi-paged pdf:<code>convert -adjoin -page A4 *.jpeg multipage.pdf </code>

and the list will go on....</pre>
</div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Renaming files using Perl command rename]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/16/renaming-files-using-perl-command-rename/</link>
<pubDate>Mon, 16 Nov 2009 12:19:02 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/16/renaming-files-using-perl-command-rename/</guid>
<description><![CDATA[I have been using this command for a while now and it helped very much.The command rename is availab]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>I have been using this command for a while now and it helped very much.<br />The command <b>rename</b> is available in <b>perl package</b>. This is a core package brought by the Debian installer.<br />To check the availability of the command : <br /><b><br />fool@localhost:~$which rename<br />/usr/bin/rename</b></p>
<p>Having a closer look at the command, you will notice that it is a symbolic link to <b>/etc/alternatives/rename</b> :</p>
<p><b>fool@localhost:~$ls -l /usr/bin/rename<br />lrwxrwxrwx 1 root root 24 août&#160; 23&#160; 2008 /usr/bin/rename -&#62; /etc/alternatives/rename</b></p>
<p>To display the current configuration : <b></p>
<p>root@localhost:~#update-alternatives &#8211;display rename<br />rename &#8211; auto mode<br />&#160;link currently points to /usr/bin/prename<br />/usr/bin/prename &#8211; priority 60<br />&#160;slave rename.1.gz: /usr/share/man/man1/prename.1.gz<br />Current `best&#8217; version is /usr/bin/prename.</b></p>
<p>How to use this command?<br />Quite simple if you know how to use regular expressions.<br />Thanks to the option <b>-n</b>, you can test your regular expression without renaming your files effectively.<br />Let us have an example :</p>
<p><b>fool@localhost:~$touch fool_1.t fool_2.t</b></p>
<p>If you want to rename fool_1.t and fool_2.t into fool1.t and fool2.t :&#160; <br /><b>fool@localhost:~$rename -n &#8217;s/_//g&#8217; *.t<br />fool_1.t renamed as fool1.t<br />fool_2.t renamed as fool2.t</b></p>
<p>To rename the files permanently, remove the option &#8216;<b>-n</b>&#8216; : <br /><b>fool@localhost:~$rename &#8217;s/_//g&#8217; *.t</b></p>
<p>More information :<br /><b><br />man rename </b><br />&#160;</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" alt="" src="http://img.zemanta.com/pixy.gif?x-id=7c9754ca-47f6-8a35-8892-55f6f8a3b260" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Find and Replace Text in Unix]]></title>
<link>http://dailyuse.wordpress.com/2009/11/15/find-and-replace-text-in-unix/</link>
<pubDate>Sun, 15 Nov 2009 18:48:54 +0000</pubDate>
<dc:creator>danutzdobrescu</dc:creator>
<guid>http://dailyuse.wordpress.com/2009/11/15/find-and-replace-text-in-unix/</guid>
<description><![CDATA[Many times I&#8217;ve wanted to do a refractoring, a find and replace for a specific word in an enti]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Many times I&#8217;ve wanted to do a <em>refractoring</em>, a find and replace for a specific word in an entire folder of files, and every time i was searching for a software with a dedicated GUI to do this&#8230; but it seems more simple this way:</p>
<p><code>find . -name '*.txt' -print &#124; xargs perl -p -i -e's/Windows/Linux/ig' *.txt</code></p>
<p>This will find <strong>recursively</strong> from <strong>root</strong> in all the <strong>.txt</strong> files the word <strong>Windows</strong> and it will replace it with <strong>Linux</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[join variable length multiline data entries with sed]]></title>
<link>http://grault.wordpress.com/2009/11/13/join-variable-length-multiline-data-entries-with-sed/</link>
<pubDate>Fri, 13 Nov 2009 15:19:26 +0000</pubDate>
<dc:creator>grault</dc:creator>
<guid>http://grault.wordpress.com/2009/11/13/join-variable-length-multiline-data-entries-with-sed/</guid>
<description><![CDATA[% cat test.txt data1-1 data1-2 data1-3 closing-form data2-1 data2-2 data2-3 data2-4 closing-form dat]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><pre>
% cat test.txt
data1-1
data1-2
data1-3
closing-form
data2-1
data2-2
data2-3
data2-4
closing-form
data3-1
data3-2
closing-form
% cat test.txt &#124; sed -n -e ':x;N;/\nclosing-form$/!bx;s/\n/;/g;p'
data1-1;data1-2;data1-3;closing-form
data2-1;data2-2;data2-3;data2-4;closing-form
data3-1;data3-2;closing-form
%
</pre>
<p>&#160;
<p>A precodition is that there&#8217;s no empty data entry. If there is, you can introduce helper entries:</p>
<pre>
% cat testt.txt
data1-1
data1-2
closing-form
closing-form
closing-form
data3-1
data3-2
closing-form
% cat testt.txt &#124; sed '/^closing-form$/ihelper-entry'
data1-1
data1-2
helper-entry
closing-form
helper-entry
closing-form
helper-entry
closing-form
data3-1
data3-2
helper-entry
closing-form
%
</pre>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Batch File Help]]></title>
<link>http://cn180.wordpress.com/2009/11/12/batch-file-help/</link>
<pubDate>Thu, 12 Nov 2009 23:40:55 +0000</pubDate>
<dc:creator>Phil Fenton</dc:creator>
<guid>http://cn180.wordpress.com/2009/11/12/batch-file-help/</guid>
<description><![CDATA[The following files may provide you with some insight into creating bacth files. Microsoft Technet ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The following files may provide you with some insight into creating bacth files.</p>
<p>Microsoft Technet &#8211; creating powerful batch files <a href="http://bit.ly/476weF">http://bit.ly/476weF</a></p>
<p>DSAdd and DSMod tutorial &#8211; <a href="http://bit.ly/2QRGrV">http://bit.ly/2QRGrV</a></p>
<p>Tech Republic AD Command line Tutorial &#8211; <a href="http://bit.ly/JYCC2">http://bit.ly/JYCC2</a></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Lab Assignment - November 12th]]></title>
<link>http://cn180.wordpress.com/2009/11/12/lab-assignment-november-12th/</link>
<pubDate>Thu, 12 Nov 2009 16:44:37 +0000</pubDate>
<dc:creator>Phil Fenton</dc:creator>
<guid>http://cn180.wordpress.com/2009/11/12/lab-assignment-november-12th/</guid>
<description><![CDATA[Lab assignment &#8211; The following tasks should be completed today. Perform DC promo in reverse In]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>Lab assignment &#8211; The following tasks should be completed today.</p>
<ol>
<li>Perform DC promo in reverse</li>
<li>In lock-step create a new forest root domain</li>
<li>In lock step create a new child domain</li>
<li>Create a batch file</li>
</ol>
<p>Batch file requirements -</p>
<p>Create two batch files:</p>
<p>The first batch file should do the following -</p>
<ol>
<li>Create batch file that creates the following groups: Marketing, IT, Sales, Operations</li>
<li>Place the following users in the Marketing group &#8211; Brandy Fox, Christina Clinton, Chris Dorval</li>
<li>Place the following users in the IT group &#8211; Barry Grant, Chris Vida, Richard Temple</li>
<li>Create the following users in the Sales group &#8211; Beth Lamothe, Vincent Roy, Jason Milligan</li>
<li>Create the following users in the Operations group &#8211; Marc Jeudy, Jay Dowdy, Pat Everette</li>
</ol>
<p>The first batch file should also use the pwd and enable switches to make sure the all the ids are fully functional when they are created.</p>
<p>Create a second batch file that does the following:</p>
<ol>
<li>Deletes all users</li>
</ol>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Grabbing infos on your X server version]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/12/grabbing-infos-on-your-x-server-version/</link>
<pubDate>Thu, 12 Nov 2009 15:42:14 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/12/grabbing-infos-on-your-x-server-version/</guid>
<description><![CDATA[It can be pretty useful to know the version of your X server installation. There are at least two wa]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>It can be pretty useful to know the version of your X server installation.</p>
<p>There are at least two ways to get this piece of information. As root, issue one of the following commands :</p>
<p><strong>root@localhost:~#X -version</strong></p>
<p>or</p>
<p><strong>root@localhost:~# xdpyinfo &#124; head </strong></p>
<p>The last command will display the first 20 lines from the output of <strong>xdpyinfo</strong></p>
<p>Make sure you have the package <strong>x11-utils</strong> installed so that the command <strong>xdpyinfo</strong> will be available.<strong><br />
</strong></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[Install the package locate to get the eponymous command]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/12/searching-for-files-using-locate/</link>
<pubDate>Thu, 12 Nov 2009 11:45:59 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/12/searching-for-files-using-locate/</guid>
<description><![CDATA[The first way to search for a file in all a filesystem is to use the command locate With Debian, loc]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>The first way to search for a file in all a filesystem is to use the command <strong>locate</strong><br />
With Debian, <strong>locate</strong> is no more included in the package <strong>findutils</strong>.<br />
You must install the package <strong>locate</strong> which provides the commands <strong>locate</strong> and <strong>updatedb</strong>.<br />
As root :<br />
<strong>root@localhost:~#</strong><strong>apt-get install locate</strong></p>
<p>Then, issue the following command to check whether the commands <strong>locate</strong> and <strong>updatedb</strong> are available :</p>
<p><strong>root@localhost:~#which locate<br />
</strong><strong>root@localhost:~#</strong><strong>which updatedb</strong></p>
<p>The command <strong>locate</strong> looks through an index for searching a file.<br />
This index is built after issuing the command  <strong>updatedb</strong> as root :<br />
<strong><br />
</strong><strong>root@localhost:~#</strong><strong>updatedb</strong></p>
<p>The more recent the index is, the more efficient is the search through <strong>locate</strong>.<br />
Make sure that the index is rebuilt on a regular basis. This point is all the more crucial since there are a lot of files creation/deletion. The index could be outdated very quickly.</p>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=443e9401-a6e1-8e40-b1bf-979623c98336" alt="" /></div>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to find open ports with the netstat command]]></title>
<link>http://localgovernmentsharepoint.wordpress.com/2009/11/11/how-to-find-open-ports-with-the-netstat-command/</link>
<pubDate>Wed, 11 Nov 2009 19:05:24 +0000</pubDate>
<dc:creator>Rob Ashcroft</dc:creator>
<guid>http://localgovernmentsharepoint.wordpress.com/2009/11/11/how-to-find-open-ports-with-the-netstat-command/</guid>
<description><![CDATA[To find open ports on a computer, you can use netstat command line. To display all open ports, open ]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>To find open ports on a computer, you can use netstat command line.</p>
<ol>
<li>To display all open ports, open DOS command, type <em>netstat</em> and press Enter.</li>
<li>To list all listening ports, use <em>netstat -an &#124;find /i &#8220;listening&#8221;</em> command.</li>
<li>To see what ports your computer actually communicates with, use <em>netstat -an &#124;find /i &#8220;established&#8221;</em></li>
<li>To find specified open port, use find switch. For example, to find if the port 3389 is open or not, do <em>netstat -an &#124;find /i &#8220;3389&#8243;.</em></li>
<li>You can use PULIST from the Windows Resource Kit to find which process is using a specified port. For example, <em>pulist &#124;find /i &#8220;4125&#8243;</em> may display</li>
</ol>
<p>Process    PID     User<br />
mad.exe   4125   Chicagotech/blin</p>
<p>Or you can use tasklist to find PID.</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[How to shutdown ubuntu from the command line]]></title>
<link>http://zappedpoint.wordpress.com/2009/11/11/how-to-shutdown-ubuntu-from-the-command-line/</link>
<pubDate>Wed, 11 Nov 2009 18:19:18 +0000</pubDate>
<dc:creator>sigtermer</dc:creator>
<guid>http://zappedpoint.wordpress.com/2009/11/11/how-to-shutdown-ubuntu-from-the-command-line/</guid>
<description><![CDATA[To shutdown ubuntu, type: sudo shutdown -h 0 This command can be used for other purposes such as reb]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>To shutdown ubuntu, type:<br />
<code><b>sudo shutdown -h 0</b></code></p>
<p>This command can be used for other purposes such as rebooting the system (-r). The 0 indicates the amount of time before the systems starts to shutdown which can be an integer or the string <code>now</code>.<br />
see <code>man 8 shutdown</code></p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[কমান্ড লাইন থেকে ক্যালকুলেটর তৈরী করা ]]></title>
<link>http://nasir8891.wordpress.com/2009/11/10/create-a-command-line-calculator/</link>
<pubDate>Tue, 10 Nov 2009 14:11:58 +0000</pubDate>
<dc:creator>nasir khan</dc:creator>
<guid>http://nasir8891.wordpress.com/2009/11/10/create-a-command-line-calculator/</guid>
<description><![CDATA[লিনাক্স  বা  ম্যাক এর অনেক ব্যবহারকারী কামন্ড লাইন থেকে কাজ করতে বেশী অভ্যস্ত। সেখানে কাজ করার সময় য]]></description>
<content:encoded><![CDATA[লিনাক্স  বা  ম্যাক এর অনেক ব্যবহারকারী কামন্ড লাইন থেকে কাজ করতে বেশী অভ্যস্ত। সেখানে কাজ করার সময় য]]></content:encoded>
</item>
<item>
<title><![CDATA[I Didn't Know What to Call It, So I Did.]]></title>
<link>http://41hebrewcat.wordpress.com/2009/11/09/i-didnt-know-what-to-call-it-so-i-did/</link>
<pubDate>Mon, 09 Nov 2009 00:30:14 +0000</pubDate>
<dc:creator>TWM</dc:creator>
<guid>http://41hebrewcat.wordpress.com/2009/11/09/i-didnt-know-what-to-call-it-so-i-did/</guid>
<description><![CDATA[09NOV08 &#8211; Pieces of madness from last night&#8217;s dream.  Our Hero, locked inside a dusty vo]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><p>09NOV08 &#8211; Pieces of madness from last night&#8217;s dream.  Our Hero, locked inside a dusty voodoo mansion crowded with dying candles, unpurposed flowers and empty bottles.  Chalk drawings and macabre masks, scattered alters and borrowed bones.  <em>&#8220;Be careful what gets into your heads, Little Ones, for it may never come out again.&#8221;</em></p>
<p>And so I hid my eyes beneath a threadbare blanket while various horrors took place around me.  I didn&#8217;t see any of it and don&#8217;t remember it, understanding somehow that if I peeked or acknowledged what was happening on the other side of that blanket, I&#8217;d be instantly set upon by angry men with long knives and a language barrier incapable of interpreting my cries for mercy.</p>
<p><em>&#8220;You can gaze upon the lords, but looking at the shogun will make you blind, and the emperor cannot be seen at all.&#8221;</em> This is important, somehow.</p>
<p>Sitting in a coffee house listening to <em>Also Spake Zarathustra</em> and attempting to write up to that triumphant sound.  (It&#8217;s probably gonna take more than a shitty netbook and a $4.95 coffee, but I think we can all agree that it&#8217;s good to dream.)</p>
<p>Just a few strands of crystalline fiber sticking out the physical access port.  I pinch one gossamer thread between the thumb and index finger of my left hand and pull it outward, inserting it carefully into my eye, feeling nothing as the mechanism within squirms toward and copulates with my optic nerve&#8230;</p>
<p><em>First there is a mountain,<br />
then there is no mountain,<br />
then there is.</em></p>
<p>My hands fall limp into my lap, and my thoughts begin walking around on their own:</p>
<p>Quote in memory: &#8220;I don&#8217;t give a stack of tits what anyone says about rehashed ideas.  If you can scour the graveyard of rock n&#8217; roll and build something new from the rusted hulks you find there you&#8217;re onto something good, because it&#8217;s harder to create than it is to destroy.&#8221;</p>
<p>In-flight moment: &#8220;Yeah, like a moist toilette is gonna do it.  As if breathing in that faint antiseptic steam is gonna chase away the bleary eyes, the stiff shoulders, the compacted spine, and the terrible suspicion that someone slathered the dregs of a deep fat fryer across my sleeping face, dabbing the brush in my mouth for good measure.  Still, the Sky Ninja&#8217;s got enough shit to worry about; slamming, shuffling, stumbling, sorting and smiling.  Not only does a Sky Ninja have to look their best at all times, but they have to serve you hot coffee in high turbulence, make change for a $50, and still be able to herd your panicking, cattle-stampeding ass off this burning dick in the event that shit suddenly goes sideways.  So thank you, Sky Ninja.  This pre-moistened towelette will do just fine.&#8221;</p>
<p>July 21, 2006:  The assassin in freefall, his parachute failed.  Got to make his bones regardless; draws both pistols and does his best to draw a bead while plummeting ever closer to the ground.  Target exits the building, maybe twenty paces to the waiting limo. <em>&#8220;If I can&#8217;t take him out with a bullet, maybe I can break him with my fall.&#8221;</em> Target looks up at the last second.  Look on the target&#8217;s face was priceless.  Never saw it comming.</p>
<p>Found in journal: &#8220;And in those final moments, when our entire lives flash before our eyes, we will concentrate upon this instant in futility, as though we could lift the needle from the record and pause the song, as though we could skip this unpleasant paragraph and leave the story incomplete.  But when you die, make sure all you gotta do is die, and that Jeff Goldblum is doing tai chi.&#8221;</p>
<p>The minutes keep on walking; a colorful and irreplaceable parade of precious cruelties and unspeakable magic broken into short intervals.  And sometimes, people throw candy…</p>
<p>In the park, near a statue:</p>
<p><em>Robber barons use<br />
their ill-gotten wealth to<br />
create public zen.</em></p>
<p>Speak all languages: the planet&#8217;s personal mediator, sitting at an intersection of life and death, watching armies march in all directions.  Turn your cell phone off, and ignore every text the End Man sends you, as the sky grows dark with circling birds.</p>
<p>The next day was Sunday.  I sat in a cafe watching the snowflakes tumble down fast and fat as the waitress brings me coffee.  A man with a Mohawk cooked my breakfast.</p>
<p>“The rest is easy, because Henry Miller made it look easy.”</p>
<p>I live for the moments when the music and the mood unite, when the planets groan into position like a clock of immeasurable proportion and suddenly I&#8217;m walking down the street with my head on fire, trailing tongues of trickling blue.  Suddenly, time grinds to a squeaking halt.  And not just around me, or on this block, or in this city state, but in all places, and at all times: fish frozen in the rivers, birds halted in mid-flight, sunlight with the parking brake on, and the light of distant stars idling like cars at an intersection.</p>
<p>I understood long ago that I will never die.  That&#8217;s right.  I&#8230; will&#8230; never&#8230; die&#8230; I <em>will</em> grow old, and I <em>will</em> eventually shit my last, but the &#8216;me&#8217; that makes up &#8216;me&#8217; will be recycled.  I&#8217;ll be back again.  I am not, as the man said, &#8221; a beautiful and unique snowflake.&#8221;  My thoughts have been thought before, and will occur to others again.  I get it.  And I&#8217;m okay with that.</p>
<p>That&#8217;s the lowest form of truth, the baseline.  We are born, we live, and we die.  Everything takes place in this dimension, and on this planet.  Nobody really knows anything, and everything will surprise you if you let it.  Nothing lasts forever, except nothing and forever, and in the end, there are no odds to beat.</p>
<p>Either it will or it won&#8217;t,</p>
</div>]]></content:encoded>
</item>
<item>
<title><![CDATA[modules.pcimap file missing for the 2.6.26-2-686 kernel version]]></title>
<link>http://linuxindetails.wordpress.com/2009/11/07/modules-pcimap-file-missing-for-the-2-6-26-2-686-kernel-version/</link>
<pubDate>Sat, 07 Nov 2009 13:52:40 +0000</pubDate>
<dc:creator>linuxindetails</dc:creator>
<guid>http://linuxindetails.wordpress.com/2009/11/07/modules-pcimap-file-missing-for-the-2-6-26-2-686-kernel-version/</guid>
<description><![CDATA[modules.pcimap file can be found in the following directory : /lib/modules/$(uname -r)/ This file is]]></description>
<content:encoded><![CDATA[<div class='snap_preview'><pre class="message">modules.pcimap file can be found in the following directory :
<strong>/lib/modules/$(uname -r)/</strong>

This file is used to find the corresponding module for a PCI device
providing the model id through a <strong>'grep' </strong>command :
Here, the model id is 0900 :

<strong>grep 0900 /lib/modules/2.6.26-2-686/modules.pcimap &#124;more
</strong>
The result consists of many matching lines. Only one is the good one.
You have to issue a new <strong>'grep'</strong> command with the vendor id :
Here, the vendor id is 1039 :

<strong>grep 0900 /lib/modules/2.6.26-2-686/modules.pcimap &#124;grep 1039</strong>

And the result is : 

<strong> sis900            0x00001039 0x00000900  0xffffffff 0xffffffff 0x00000000 0x00000000    0x0</strong>

If you want to have more infos about this module : 

<strong>modinfo sis900</strong>

To create or to re-create this modules.pcimap file, issue the command below :

<strong>depmod -a -m -F /boot/System.map-2.6.26-2-686 2.6.26-2-686</strong>
</pre>
<div class="zemanta-pixie"><img class="zemanta-pixie-img" src="http://img.zemanta.com/pixy.gif?x-id=1cff0146-3f5f-897f-a38d-69dd5fc1b233" alt="" /></div>
</div>]]></content:encoded>
</item>

</channel>
</rss>
