<?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>MicMek&#039;s Blog &#187; linux</title>
	<atom:link href="http://blog.micmek.com/category/linux/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.micmek.com</link>
	<description>CopTECH</description>
	<lastBuildDate>Thu, 22 Apr 2010 00:38:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Useful Linux Stuff</title>
		<link>http://blog.micmek.com/2008/05/30/6/</link>
		<comments>http://blog.micmek.com/2008/05/30/6/#comments</comments>
		<pubDate>Fri, 30 May 2008 07:23:00 +0000</pubDate>
		<dc:creator>Michael Mekaail</dc:creator>
				<category><![CDATA[linux]]></category>
		<category><![CDATA[mounting]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://blog.micmek.com/?p=6</guid>
		<description><![CDATA[Here are some useful stuff I need to blog about just in case I need to find them again. Also, some side notes to help me get to know linux better
Copying problem
when you are copying a folder to another place and you want to rename that folder then DONT create that folder first!!
eg.
If I have [...]]]></description>
			<content:encoded><![CDATA[<p>Here are some useful stuff I need to blog about just in case I need to find them again. Also, some side notes to help me get to know linux better</p>
<h2><a name="Linux-Copyingproblem"></a>Copying problem</h2>
<p>when you are copying a folder to another place and you want to rename that folder <strong>then DONT create that folder first!!</strong><br />
eg.<br />
If I have /home/micmek/testA and I want to copy it to /home/micmek/workingA<br />
If folder <strong>workingA</strong> already exists then</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>cp /home/micmek/testA /home/micmek/workingA</pre>
</div>
</div>
<p>will produce</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>/home/micmek/workingA/testA</pre>
</div>
</div>
<p>but if the folder doesnt exist then the SAME command will produce</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>/home/micmek/workingA</pre>
</div>
</div>
<h2><a name="Linux-Links"></a>Links</h2>
<h3><a name="Linux-SymbolicLinksvs.HardLinks"></a>Symbolic Links vs. Hard Links</h3>
<p>Symbolic links point to the file/folder path<br />
Hard links find the Inode that the file is pointing to and points to the same Inode (Data/Content)<br />
Folders have to be symbolic link</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>ln -s /usr/local/Adobe/bin/acroread acroread</pre>
</div>
</div>
<h2><a name="Linux-Usefulcommands"></a>Useful commands</h2>
<h3><a name="Linux-ExitingSSH"></a>Exiting SSH</h3>
<p>Type <strong>~.</strong> and you will exit ssh</p>
<h3><a name="Linux-BootLog"></a>Boot Log</h3>
<p>To find out the log messages from your the booting up of linux ie. all the hardware info type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>dmesg</pre>
</div>
</div>
<p>This is useful for mounting purposes too.</p>
<h3><a name="Linux-Paths"></a>Paths</h3>
<p>To find out where a file that you commonly execute is in the path structure type the following</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>whereis cat</pre>
</div>
</div>
<h3><a name="Linux-Findstringinpath"></a>Find string in path</h3>
<p>To find a certain pattern in a set of files then type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>find . | xargs grep 'XXX'</pre>
</div>
</div>
<p>This returns all the files that contain that string</p>
<h3><a name="Linux-Sizeoffolder"></a>Size of folder</h3>
<p>To find the size of a folder type (uses the Disk Usage command)</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>du -ks PATH</pre>
</div>
</div>
<h3><a name="Linux-FilePermissions"></a>File Permissions</h3>
<p>Confusing as it is it's pretty simple</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>chmod OGO file</pre>
</div>
</div>
<p>Where OGO is a 3 digit number.<br />
O-Owner G-Group O-Other Users<br />
<tt>4 = READ || 2 = WRITE || 1 = EXECUTE</tt><br />
So if you want a file to be</p>
<table class="confluenceTable" border="0">
<tbody>
<tr>
<th class="confluenceTh"></th>
<th class="confluenceTh">Owner</th>
<th class="confluenceTh">Group</th>
<th class="confluenceTh">Others</th>
</tr>
<tr>
<th class="confluenceTh">Read (4)</th>
<td class="confluenceTd">4</td>
<td class="confluenceTd">4</td>
<td class="confluenceTd">4</td>
</tr>
<tr>
<th class="confluenceTh">Write (2)</th>
<td class="confluenceTd">2</td>
<td class="confluenceTd">0</td>
<td class="confluenceTd">0</td>
</tr>
<tr>
<th class="confluenceTh">Execute (1)</th>
<td class="confluenceTd">1</td>
<td class="confluenceTd">1</td>
<td class="confluenceTd">1</td>
</tr>
<tr>
<th class="confluenceTh">Total</th>
<td class="confluenceTd">7</td>
<td class="confluenceTd">5</td>
<td class="confluenceTd">5</td>
</tr>
</tbody>
</table>
<p>Changes owner of file</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>chown USER file</pre>
</div>
</div>
<h2><a name="Linux-Mounting"></a>Mounting</h2>
<h3><a name="Linux-Listofmounteddevices"></a>List of mounted devices</h3>
<p>To find out what has been mounted type df</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>df</pre>
</div>
</div>
<h3><a name="Linux-Mounting&amp;Unmounting"></a>Mounting &amp; Unmounting</h3>
<p>To mount type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>mount -t TYPE /dev/DEVICE PATHmount -t vfat /dev/sdb /mnt/usb</pre>
</div>
</div>
<p>To unmount type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>umount PATHumount /mnt/usb</pre>
</div>
</div>
<h3><a name="Linux-Mounting&amp;UnmountingSSHpath"></a>Mounting &amp; Unmounting SSH path</h3>
<p>To mount a sshfs type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>sshfs HOST:PATH TARGETsshfs example.com:/stuff /media/home-pc</pre>
</div>
</div>
<p>To unmount type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>fusermount -u PATHfusermount -u /media/home-pc</pre>
</div>
</div>
<p>More Info here:<br />
<a rel="nofollow" href="http://ubuntu.wordpress.com/2005/10/28/how-to-mount-a-remote-ssh-filesystem-using-sshfs/">how to mount a remote ssh file system using sshfs</a></p>
<h2><a name="Linux-Services"></a>Services</h2>
<p>Services are started and stopped through the following command:</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>/etc/init.d/SERVICE start/etc/init.d/SERVICE stop</pre>
</div>
</div>
<h2><a name="Linux-LinuxFolderstructure"></a>Linux Folder structure</h2>
<p>Logs are kept under</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>/var/logs/XXX</pre>
</div>
</div>
<p>Software is usually installed under</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>/usr/local</pre>
</div>
</div>
<h2><a name="Linux-Package"></a>Package</h2>
<p>To install a package use</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>sudo apt-get install XXX</pre>
</div>
</div>
<p>To install a package use</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>sudo apt-cache search XXX</pre>
</div>
</div>
<p>To find out where a package is installed type</p>
<div class="preformatted panel" style="border-width: 1px;">
<div class="preformattedContent panelContent">
<pre>dpkg -L XXX
<h2>Useful Links</h2>

<a href="http://www.er.uqam.ca/nobel/r10735/unixcomm.html#tth_sEc2">http://www.er.uqam.ca/nobel/r10735/unixcomm.html#tth_sEc2</a></pre>
</div>
</div>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff" title="Facebook" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff" title="Twitter" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff" title="Delicious" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.micmek.com%2F2008%2F05%2F30%2F6%2F&amp;linkname=Useful%20Linux%20Stuff">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.micmek.com/2008/05/30/6/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Power of Cygwin</title>
		<link>http://blog.micmek.com/2006/10/18/4/</link>
		<comments>http://blog.micmek.com/2006/10/18/4/#comments</comments>
		<pubDate>Thu, 19 Oct 2006 02:58:00 +0000</pubDate>
		<dc:creator>Michael Mekaail</dc:creator>
				<category><![CDATA[Cygwin]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[putty]]></category>

		<guid isPermaLink="false">http://blog.micmek.com/?p=4</guid>
		<description><![CDATA[
I just found out some cool tricks in Cywgin and Putty.
1. I know how to store passwords now using
PuTTY Key Generator
PLink
This is done by generating a public key and putting it onto your server under ~/.ssh/autherizationkeys
and putting the private key anywhere on your computer and then pointing to it from the PuTTy Configuration "Private Key [...]]]></description>
			<content:encoded><![CDATA[<h2></h2>
<p>I just found out some cool tricks in Cywgin and Putty.</p>
<p>1. I know how to store passwords now using<br />
PuTTY Key Generator<br />
PLink<br />
This is done by generating a public key and putting it onto your server under ~/.ssh/autherizationkeys<br />
and putting the private key anywhere on your computer and then pointing to it from the PuTTy Configuration "Private Key file Authentication"</p>
<p>2. I now know how to create a SSH Daemon so that I can log into my computer's ssh terminal.<br />
check out this site...</p>
<p>http://qcwizards.chem.warwick.ac.uk/~yousaf/tips/cygwin/index.htm</p>
<p>another cool cygwin reference</p>
<p>http://www.astro.umd.edu/~harris/cygwin/</p>
<p>Pretty cool!</p>
<p><a href="http://www.addtoany.com/add_to/facebook?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin" title="Facebook" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/facebook.png" width="16" height="16" alt="Facebook"/></a> <a href="http://www.addtoany.com/add_to/twitter?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin" title="Twitter" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/twitter.png" width="16" height="16" alt="Twitter"/></a> <a href="http://www.addtoany.com/add_to/google_buzz?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin" title="Google Buzz" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/google_buzz.png" width="16" height="16" alt="Google Buzz"/></a> <a href="http://www.addtoany.com/add_to/delicious?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin" title="Delicious" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/delicious.png" width="16" height="16" alt="Delicious"/></a> <a href="http://www.addtoany.com/add_to/stumbleupon?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin" title="StumbleUpon" rel="nofollow" target="_blank"><img src="http://blog.micmek.com/wp-content/plugins/add-to-any/icons/stumbleupon.png" width="16" height="16" alt="StumbleUpon"/></a> <a class="a2a_dd addtoany_share_save" href="http://www.addtoany.com/share_save?linkurl=http%3A%2F%2Fblog.micmek.com%2F2006%2F10%2F18%2F4%2F&amp;linkname=Power%20of%20Cygwin">Share/Bookmark</a></p>]]></content:encoded>
			<wfw:commentRss>http://blog.micmek.com/2006/10/18/4/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

