<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Nasser Heidari</title>
	<atom:link href="http://linax.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://linax.wordpress.com</link>
	<description></description>
	<lastBuildDate>Mon, 09 Jan 2012 20:09:47 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='linax.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Nasser Heidari</title>
		<link>http://linax.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://linax.wordpress.com/osd.xml" title="Nasser Heidari" />
	<atom:link rel='hub' href='http://linax.wordpress.com/?pushpress=hub'/>
		<item>
		<title>Bash: String Manipulations</title>
		<link>http://linax.wordpress.com/2012/01/09/bash-string-manipulations/</link>
		<comments>http://linax.wordpress.com/2012/01/09/bash-string-manipulations/#comments</comments>
		<pubDate>Mon, 09 Jan 2012 20:09:47 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=632</guid>
		<description><![CDATA[Bash supports a surprising number of string manipulation operations. If you use bash in your daily work, I&#8217;m pretty sure you will find these operations many useful and handy. 1. Counting Arguments: ${#} You need to know with how many parameters the script was invoked. Use the shell built-in variable ${#}. 2. String Length: ${#parameter} [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=632&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Bash supports a surprising number of string manipulation operations. If you use bash in your daily work, I&#8217;m pretty sure you will find these operations many useful and handy.</p>
<p><strong>1. Counting Arguments: ${#} </strong><br />
You need to know with how many parameters the script was invoked. Use the shell built-in variable <strong>${#}</strong>.</p>
<p><strong>2. String Length: ${#parameter} </strong><br />
The length in characters of the value of parameter is substituted.  If parameter is * or @, the value substituted is the number of positional parameters.</p>
<p><strong>3.1 Shortest Substring Match: ${parameter#word}</strong><br />
Deletes the shortest match of word from front of parameter</p>
<p><strong>3.2 Shortest Substring Match: ${parameter%word}</strong><br />
Deletes the shortest match of word from back of parameter</p>
<p><strong>4.1 Longest Substring Match: ${parameter##word}</strong><br />
Deletes the longest match of word from front of parameter</p>
<p><strong>4.2 Longest Substring Match: ${parameter%%word}</strong><br />
Deletes the Longest match of word from back of parameter</p>
<p><strong>5.1 Substring Replacement: ${parameter/pattern/word}</strong><br />
Replace first match of pattern with string.</p>
<p><strong>5.2 Substring Replacement: ${parameter//pattern/word}</strong><br />
Replace All matches of pattern with word.</p>
<p><strong>6.1 Replace beginning and end: ${parameter/#pattern/word}</strong><br />
If pattern matches front end of parameter, substitute word for pattern.</p>
<p><strong>6.2 Replace end and beginning: ${parameter/%pattern/word}</strong><br />
If pattern matches end end of parameter, substitute word for pattern.</p>
<p>You can find more Information and Examples regarding mentioned operators in following links:<br />
<a href="http://tldp.org/LDP/abs/html/string-manipulation.html" title="The Linux Documentation Project" target="_blank">http://tldp.org</a><br />
<a href="http://www.linuxtopia.org/online_books/advanced_bash_scripting_guide/string-manipulation.html" title="Linuxtopia " target="_blank">http://www.linuxtopia.org</a><br />
<a href="http://linuxgazette.net/18/bash.html" title="Linux Gazette" target="_blank">http://linuxgazette.net</a><br />
<a href="http://www.thegeekstuff.com/2010/07/bash-string-manipulation/" title="The Geek Stuff" target="_blank">http://www.thegeekstuff.com</a></p>
<br /> Tagged: <a href='http://linax.wordpress.com/tag/bash/'>bash</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/632/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/632/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/632/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=632&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2012/01/09/bash-string-manipulations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Bash: Saving or Grouping Output from Several Commands</title>
		<link>http://linax.wordpress.com/2012/01/06/bash-saving-or-grouping-output-from-several-commands/</link>
		<comments>http://linax.wordpress.com/2012/01/06/bash-saving-or-grouping-output-from-several-commands/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 20:23:06 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[bash]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=627</guid>
		<description><![CDATA[You want to capture the output with a redirect, but you’re typing several commands on one line. $ pwd; ls; cd ../elsewhere; pwd; ls &#62; /tmp/all.out The final redirect applies only to the last command, the last ls on that line. All the other output appears on the screen (i.e., does not get redirected). Solution: [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=627&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>You want to capture the output with a redirect, but you’re typing several commands<br />
on one line.<br />
<strong>$ pwd; ls; cd ../elsewhere; pwd; ls &gt; /tmp/all.out</strong><em><br />
The final redirect applies only to the last command, the last ls on that line. All the<br />
other output appears on the screen (i.e., does not get redirected).</p>
<p><strong>Solution:</strong></p>
<p>Use braces { } to group these commands together, then redirection applies to the<br />
output from all commands in the group. For example:</p>
<p><strong>$ { pwd; ls; cd ../elsewhere; pwd; ls; } &gt; /tmp/all.out</strong></em></p>
<p>There are two very subtle catches here. The braces are actually<br />
reserved words, so they must be surrounded by white space. Also, the<br />
trailing semicolon is required before the closing space.<br />
Alternately, you could use parentheses ( ) to tell bash to run the commands in a subshell,<br />
then redirect the output of the entire subshell’s execution. For example:</p>
<p><strong>$ (pwd; ls; cd ../elsewhere; pwd; ls) &gt; /tmp/all.out</strong><em></p>
<br /> Tagged: <a href='http://linax.wordpress.com/tag/bash/'>bash</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/627/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/627/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/627/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=627&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2012/01/06/bash-saving-or-grouping-output-from-several-commands/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>lsof: A Unix Utility You Should Know About</title>
		<link>http://linax.wordpress.com/2012/01/06/lsof-a-unix-utility-you-should-know-about/</link>
		<comments>http://linax.wordpress.com/2012/01/06/lsof-a-unix-utility-you-should-know-about/#comments</comments>
		<pubDate>Fri, 06 Jan 2012 14:02:20 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[lsof]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=619</guid>
		<description><![CDATA[LSOF lists information about files opened by processes. An open file may be a regular file, a directory, a NFS file, a block special file, a character special file, a shared library, a regular pipe, a named pipe, a symbolic link, a socket stream, an Internet socket, a UNIX domain socket, and many others. Since [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=619&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><strong>LSOF </strong>lists information about files opened by processes. An open file may be a regular file, a directory, a NFS file, a block special file, a character special file, a shared library, a regular pipe, a named pipe, a symbolic link, a socket stream, an Internet socket, a UNIX domain socket, and many others. Since almost everything in Unix is a file, you can imagine how incredibly useful lsof is!</p>
<p><strong>lsof in action: </strong></p>
<p>- Find who&#8217;s using a file:<br />
<strong><code>lsof /path/to/file</code></strong></p>
<p>- List of Open files Per Process:<br />
<strong><code>lsof -p </code></strong></p>
<p>- List of open Files Per User:<br />
<strong><code>lsof -u </code></strong></p>
<p>- List of Open File Descriptors:<br />
<strong><code>lsof -d </code></strong></p>
<p>- List of Open Internet protocols &amp; ports:<br />
<strong><code>lsof -i</code></strong></p>
<p>- Directory Search :<br />
<strong><code>lsof +D </code></strong></p>
<p>- Find all open files by program&#8217;s name:<br />
<strong><code>lsof -c </code></strong></p>
<p>Examples:<br />
<strong># lsof -u admin,nasser</strong><br />
This will list all the files that are open by users admin and nasser.</p>
<p><strong># lsof -c httpd</strong><br />
It the list open files for processes whose name begins with httpd.</p>
<p><strong># lsof -a -u nasser -c tcsh</strong><br />
-a means AND<br />
The output will be list of files opened by tcsh, which is run under nasser user privilege.</p>
<p><strong># lsof -u ^root</strong><br />
The <strong>^</strong> character before root username will negates the match and causes lsof print all open files by all users who are not root.</p>
<p><strong># lsof -p ^1010</strong><br />
List all open files by all the processes EXCEPT process with PID 1010.</p>
<p><strong># lsof -i tcp</strong><br />
List all TCP network connections.</p>
<p><strong># lsof -i udp</strong><br />
List all UDP network connections.</p>
<p><strong># lsof -i :22</strong><br />
The :22 option to -i makes lsof find processes using TCP or UDP port 25.</p>
<p><strong># lsof -i tcp:80</strong><br />
Finds who&#8217;s using a TCP port 80.</p>
<p><strong># lsof -a -u nasser -i</strong><br />
Will Find all network activity by user nasser.</p>
<p><strong># lsof -U</strong><br />
List all Unix domain socket files.</p>
<p><strong># lsof -g 1234</strong><br />
List all files for processes with a specific group id.</p>
<p><strong># lsof -r 5 -i tcp:22</strong><br />
The -r option makes lsof repeatedly list files until interrupted.</p>
<p>Have Fun.</p>
<br /> Tagged: <a href='http://linax.wordpress.com/tag/lsof/'>lsof</a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/619/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/619/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/619/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=619&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2012/01/06/lsof-a-unix-utility-you-should-know-about/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>I&#8217;m Planning to start Over !</title>
		<link>http://linax.wordpress.com/2011/12/18/im-planning-to-start-over/</link>
		<comments>http://linax.wordpress.com/2011/12/18/im-planning-to-start-over/#comments</comments>
		<pubDate>Sun, 18 Dec 2011 09:33:41 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=611</guid>
		<description><![CDATA[After 217 days I&#8217;m here with a new non-technical post and planning to start over blogging. As I have very busy days, May be it is a little hard but I&#8217;ve decided to do it. Again Thanks to : MATT (http://thedooverguy.com/how-to-start-over-and-begin-a-new-life/)<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=611&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>After 217 days I&#8217;m here with a new non-technical post and planning to start over blogging.<br />
As I have very busy days, May be it is a little hard but I&#8217;ve decided to do it.</p>
<p>Again Thanks to :  MATT (http://thedooverguy.com/how-to-start-over-and-begin-a-new-life/)</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/611/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/611/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/611/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=611&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2011/12/18/im-planning-to-start-over/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Centos TimeZone Resets to default !!!</title>
		<link>http://linax.wordpress.com/2011/05/15/centos-timezone-resets-to-default/</link>
		<comments>http://linax.wordpress.com/2011/05/15/centos-timezone-resets-to-default/#comments</comments>
		<pubDate>Sun, 15 May 2011 16:19:45 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=612</guid>
		<description><![CDATA[Recently I have Installed and configured  a server Based on CentOs , after a while I noticed that My TimeZone Configuration resets to default after I Update server, I configured timezone again using this command: ln -sf /usr/share/zoneinfo/UTC /etc/localtime It worked again for a while and then I noticed again it has been changed to [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=612&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently I have Installed and configured  a server Based on CentOs , after a while I noticed that My TimeZone Configuration resets to default after I Update server, I configured timezone again using this command:</p>
<p><code>ln -sf /usr/share/zoneinfo/UTC /etc/localtime </code></p>
<p>It worked again for a while and then I noticed again it has been changed to default config Again !!!</p>
<p>after a little googleing i find out that it is related to my configuration file here:</p>
<p><code>/etc/sysconfig/clock</code><br /> I Just edit TimeZone on This file and it is ok now !</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/612/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/612/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/612/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=612&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2011/05/15/centos-timezone-resets-to-default/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Packet Lost on Linux Server !</title>
		<link>http://linax.wordpress.com/2011/02/05/packet-lost-on-linux-server/</link>
		<comments>http://linax.wordpress.com/2011/02/05/packet-lost-on-linux-server/#comments</comments>
		<pubDate>Sat, 05 Feb 2011 09:35:20 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=606</guid>
		<description><![CDATA[Today Our NOC team report packet lost on my Linux server, I start to check problem by pinging my server from connected router and got this result : router#ping linux-server repeat 1000 Type escape sequence to abort. Sending 1000, 100-byte ICMP Echos to linux-server, timeout is 2 seconds: !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!.!!!!.!!!.!!!!!..!!!.!!!!!!!!!!!!!!.!!!..!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!..!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=606&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Today Our NOC team report packet lost on my Linux server, I start to check problem by pinging my server from connected router and got this result :</p>
<p><strong>router#ping linux-server repeat 1000</strong></p>
<p>Type escape sequence to abort.<br />
Sending 1000, 100-byte ICMP Echos to linux-server, timeout is 2 seconds:<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!.!!!!.!!!.!!!!!..!!!.!!!!!!!!!!!!!!.!!!..!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!..!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!<br />
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!..!!.<br />
Success rate is 97 percent (579/596), round-trip min/avg/max = 1/1/4 ms</p>
<p>as you can see Success rate is 97 percent , and i have 3% packet lost from Connected router !</p>
<p>after login to server , I saw this messages on syslog :</p>
<p><strong>Feb  5 12:49:31 linux kernel: ip_conntrack: table full, dropping packet.</strong></p>
<p><strong>[root@linux ~]# sysctl net.ipv4.netfilter.ip_conntrack_max<br />
net.ipv4.netfilter.ip_conntrack_max = 65,536</strong></p>
<p>It looks like the conntrack database doesn&#8217;t have enough entries for your environment. Connection tracking by default handles up to a certain number of simultaneous connections. This number is dependent on you system&#8217;s maximum memory size.</p>
<p>You can easily increase the number of maximal tracked connections, but be aware that each tracked connection eats about 350 bytes of non-swappable kernel memory!</p>
<p>To increase this limit :</p>
<pre>
<h3>
[root@linux ~]# echo "net.ipv4.netfilter.ip_conntrack_max = 131072" &gt;&gt; /etc/sysctl.conf
[root@linux ~]# sysctl -p
</h3>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/606/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/606/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/606/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=606&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2011/02/05/packet-lost-on-linux-server/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Varnish cache Security &#8211; Removing Default Headers</title>
		<link>http://linax.wordpress.com/2011/01/27/varnish-cache-security-removing-default-headers/</link>
		<comments>http://linax.wordpress.com/2011/01/27/varnish-cache-security-removing-default-headers/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 13:17:11 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=599</guid>
		<description><![CDATA[If you want to completely remove your varnish cache footprints on HTTP Headers, flow this: sub vcl_deliver { ... ... remove resp.http.X-Varnish; remove resp.http.Via; remove resp.http.Age; remove resp.http.X-Powered-By; unset obj.http.Server; set obj.http.Server = "Go Away"; ... ... } sub vcl_error { ... ... unset obj.http.Server; set obj.http.Server = "Go Away"; ... ...<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=599&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>If you want to completely remove your varnish cache footprints on HTTP Headers, flow this:</p>
<pre>
<h3>
sub vcl_deliver {
...
...
<b>    remove resp.http.X-Varnish;
    remove resp.http.Via;
    remove resp.http.Age;
    remove resp.http.X-Powered-By;
    unset obj.http.Server;
    set obj.http.Server = "Go Away";
</b>...
...
}

sub vcl_error {
...
...<b>
    unset obj.http.Server;
    set obj.http.Server = "Go Away";
</b>...
...
</h3>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/599/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/599/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/599/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=599&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2011/01/27/varnish-cache-security-removing-default-headers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Block POST Method with VARNISH for Invalid URLS</title>
		<link>http://linax.wordpress.com/2011/01/27/block-post-method-with-varnish-for-invalid-urls/</link>
		<comments>http://linax.wordpress.com/2011/01/27/block-post-method-with-varnish-for-invalid-urls/#comments</comments>
		<pubDate>Thu, 27 Jan 2011 13:08:03 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[freebsd]]></category>
		<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=594</guid>
		<description><![CDATA[Recently, I&#8217;ve experienced very high load on my http server because of spam bots. After some inspection on the server using tools like varnishtop , tcpdump, apache mod_log_post , I&#8217;ve realized that Web Server receives lots of invalid POST Requests. as I have only few forms on the Web Server that uses POST method, I [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=594&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Recently, I&#8217;ve experienced very high load on my http server because of spam bots.<br />
After some inspection on the server using tools like <a href="http://www.varnish-cache.org/docs/trunk/reference/varnishtop.html">varnishtop</a> , tcpdump, apache <a href="http://freshmeat.net/projects/mod_log_post">mod_log_post</a> , I&#8217;ve realized that Web Server receives lots of invalid POST Requests.<br />
as I have only few forms on the Web Server that uses POST method, I decide to  Block ALL POST method REQUESTS except my forms , lets say the form urls is :<br />
/upload/mainform.php<br />
/form1.php<br />
/form2.php<br />
/form3.php</p>
<p>I just add thease lines to my Varnish configuration:</p>
<pre>
<h3>
...
...

sub vcl_recv {

...
...

        <b>if ( req.request == "POST" ) {
                if (       req.url ~ "/upload/mainform.php"
                        || req.url ~ "/form1.php"
                        || req.url ~ "/form2.php"
                        || req.url ~ "/form3.php"
                        ) {
                        return (pass);
                } else {
                        error 403 ": Requested Method is not supported by this server.";

                }
        }</b>
...
...
</h3>
</pre>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/594/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/594/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/594/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=594&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2011/01/27/block-post-method-with-varnish-for-invalid-urls/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>MySQL fatal error 1236</title>
		<link>http://linax.wordpress.com/2010/10/11/mysql-fatal-error-1236/</link>
		<comments>http://linax.wordpress.com/2010/10/11/mysql-fatal-error-1236/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 13:39:25 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=584</guid>
		<description><![CDATA[DB-1: mysql&#62; show master status; File Position Binlog_Do_DB Binlog_Ignore_DB bin.007733 824963644 DB-2: mysql&#62; STOP SLAVE; Query OK, 0 rows affected (0.00 sec) mysql&#62; FLUSH TABLES WITH READ LOCK; Query OK, 0 rows affected (0.00 sec) mysql&#62; UNLOCK TABLES; Query OK, 0 rows affected (0.00 sec) mysql&#62; CHANGE MASTER TO MASTER_HOST=&#8217;DB-1&#8242;, MASTER_USER=&#8217;replication&#8217;, MASTER_LOG_FILE=&#8217;bin.007733&#8242;, MASTER_LOG_POS=824963644; Query OK, [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=584&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>DB-1:</p>
<p>mysql&gt; show master status;</p>
<div dir="ltr">
<table border="1" cellspacing="0" cellpadding="0" width="368">
<tbody>
<tr>
<td width="79">File</td>
<td width="71">Position</td>
<td width="100">Binlog_Do_DB</td>
<td width="119">Binlog_Ignore_DB</td>
</tr>
<tr>
<td width="79">bin.007733</td>
<td width="71">824963644</td>
<td width="100"></td>
<td width="119"></td>
</tr>
</tbody>
</table>
</div>
<p>DB-2:</p>
<p>mysql&gt; STOP SLAVE;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql&gt; FLUSH TABLES WITH READ LOCK;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql&gt; UNLOCK TABLES;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql&gt; CHANGE MASTER TO<br />
MASTER_HOST=&#8217;DB-1&#8242;,<br />
MASTER_USER=&#8217;replication&#8217;,<br />
MASTER_LOG_FILE=&#8217;bin.007733&#8242;,<br />
MASTER_LOG_POS=824963644;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>mysql&gt; start slave;<br />
Query OK, 0 rows affected (0.00 sec)</p>
<p>http://www.dougreese.com/mysql-fatal-error-1236.html</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/584/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/584/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/584/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=584&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2010/10/11/mysql-fatal-error-1236/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
		<item>
		<title>Move user accounts from old Linux server to a new Linux server</title>
		<link>http://linax.wordpress.com/2010/07/20/move-user-accounts-from-old-linux-server-to-a-new-linux-server/</link>
		<comments>http://linax.wordpress.com/2010/07/20/move-user-accounts-from-old-linux-server-to-a-new-linux-server/#comments</comments>
		<pubDate>Tue, 20 Jul 2010 13:07:04 +0000</pubDate>
		<dc:creator>Nasser Heidari</dc:creator>
				<category><![CDATA[Linux]]></category>

		<guid isPermaLink="false">http://linax.wordpress.com/?p=578</guid>
		<description><![CDATA[Following files/dirs are required for traditional Linux user management: - /etc/passwd - contains various pieces of information for each user account - /etc/shadow &#8211; contains the encrypted password information for user&#8217;s accounts and optional the password aging information. - /etc/group &#8211; defines the groups to which users belong - /etc/gshadow &#8211; group shadow file (contains [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=578&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Following files/dirs are required for traditional Linux user management:</p>
<p>- <strong>/etc/passwd </strong>- contains various pieces of information for each user account<br />
- <strong>/etc/shadow</strong> &#8211; contains the encrypted password information for user&#8217;s accounts and optional the password aging information.<br />
- <strong>/etc/group</strong> &#8211; defines the groups to which users belong<br />
- <strong>/etc/gshadow</strong> &#8211; group shadow file (contains the encrypted password for group)<br />
- <strong>/var/spool/mail</strong> &#8211; Generally user emails are stored here.<br />
- <strong>/home</strong> &#8211; All Users data is stored here.</p>
<p>&#8212;&#8212;&#8212;&#8212;-<br />
Backup Routine:<br />
&#8212;&#8212;&#8212;&#8212;-</p>
<h4>
<pre><strong># mkdir /root/move/
# export UGIDLIMIT=500
# awk -v LIMIT=$UGIDLIMIT -F: '($3&gt;=LIMIT) &amp;&amp; ($3!=65534)' /etc/passwd &gt; /root/move/passwd.mig
# awk -v LIMIT=$UGIDLIMIT -F: '($3&gt;=LIMIT) &amp;&amp; ($3!=65534)' /etc/group &gt; /root/move/group.mig
# awk -v LIMIT=$UGIDLIMIT -F: '($3&gt;=LIMIT) &amp;&amp; ($3!=65534) {print $1}' /etc/passwd | tee - |egrep -f - /etc/shadow &gt;  /root/move/shadow.mig
# cp /etc/gshadow /root/move/gshadow.mig
# tar -zcvpf /root/move/home.tar.gz /home
# tar -zcvpf /root/move/mail.tar.gz /var/spool/mail</strong>
</pre>
</h4>
<p>&#8212;&#8212;&#8212;&#8212;- Move Backup Files to New Linux Server: &#8212;&#8212;&#8212;&#8212;-</p>
<h4>scp -r /root/move/*  nasser@linax.wordpress.com:/var/tmp</h4>
<p>&#8212;&#8212;&#8212;&#8212;- Restore : &#8212;&#8212;&#8212;&#8212;-</p>
<h4># mkdir /root/newsusers.bak</h4>
<h4># cp /etc/passwd /etc/shadow /etc/group /etc/gshadow /root/newsusers.bak</h4>
<h4># cd /var/tmp</h4>
<h4># cat passwd.mig &gt;&gt; /etc/passwd</h4>
<h4># cat group.mig &gt;&gt; /etc/group</h4>
<h4># cat shadow.mig &gt;&gt; /etc/shadow</h4>
<h4># /bin/cp gshadow.mig /etc/gshadow</h4>
<h4># cd /</h4>
<h4># tar -zxvf /var/tmp/home.tar.gz</h4>
<h4># tar -zxvf /var/tmp/mail.tar.gz</h4>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/linax.wordpress.com/578/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/linax.wordpress.com/578/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/linax.wordpress.com/578/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=linax.wordpress.com&amp;blog=2473033&amp;post=578&amp;subd=linax&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://linax.wordpress.com/2010/07/20/move-user-accounts-from-old-linux-server-to-a-new-linux-server/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://0.gravatar.com/avatar/0a7d935129c5150b792d349848658a84?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">linax</media:title>
		</media:content>
	</item>
	</channel>
</rss>
