<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2enclosuresfull.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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:media="http://search.yahoo.com/mrss/" xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd" version="2.0">

<channel>
	<title>System Network Programming Solution - Linux - windows - centos- security- cpanel - plesk -directadmin helm</title>
	
	<link>http://sysnetpro.net</link>
	<description>System Network Programming Solution, Shared linux windows problems ,Bash shell scripts directory for Linux / UNIX,security server and manager server</description>
	<lastBuildDate>Thu, 23 May 2013 21:39:55 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
<xhtml:meta xmlns:xhtml="http://www.w3.org/1999/xhtml" name="robots" content="noindex" />
		<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm" /><feedburner:info xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" uri="systemnetworkprogrammingsolution-linux-windows-centos-security-cpanel-plesk-directadminhelm" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><media:category scheme="http://www.itunes.com/dtds/podcast-1.0.dtd">Technology/Software How-To</media:category><itunes:explicit>no</itunes:explicit><itunes:subtitle>System Network Programming Solution, Shared linux windows problems ,Bash shell scripts directory for Linux / UNIX,security server and manager server</itunes:subtitle><itunes:category text="Technology"><itunes:category text="Software How-To" /></itunes:category><item>
		<title>How To Use Wget Through Proxy</title>
		<link>http://sysnetpro.net/os/linux/how-to-use-wget-through-proxy.html</link>
		<comments>http://sysnetpro.net/os/linux/how-to-use-wget-through-proxy.html#comments</comments>
		<pubDate>Thu, 23 May 2013 21:39:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Ftp]]></category>
		<category><![CDATA[HTTP]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[proxy server]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[use]]></category>
		<category><![CDATA[wget]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1256</guid>
		<description><![CDATA[Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL’s. Here is a brief tutorial on how to use wget through proxy server. To get wget to use a proxy, you must set up an environment variable before using wget. [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Wget is a super-useful utility to download pages and automate all types of web related tasks. It works for HTTP as well as FTP URL’s. Here is a brief tutorial on how to use wget through proxy server.</p>
<p>To get wget to use a proxy, you must set up an environment variable before using wget. Type this at the command prompt / console:<br />
For Windows:</p>
<pre class="brush:plain">set http_proxy=http://proxy.example.com:8080</pre>
<p>For Linux/Unix:</p>
<pre class="brush:plain">export http_proxy="http://proxy.example.com:8080"</pre>
<p>Replace proxy.example.com with your actual proxy server.<br />
Replace 8080 with your actual proxy server port.</p>
<p>You can similarly use ftp_proxy to proxy ftp requests. An example on Linux would be:</p>
<pre class="brush:plain">export ftp_proxy="http://proxy.example.com:8080"</pre>
<p>Then you should specify the following option in wget command line to turn the proxy behavior on:<br />
<code>–proxy=on</code></p>
<p>Alternatively you can use the following to turn it off:<br />
<code>–proxy=off</code></p>
<p>You can use –proxy-username=”user name” –proxy-passwd=”password” to set proxy user name and password where required.<br />
Replace user name with your proxy server user name and password with your proxy server password. Another alternative is to specify them in http_proxy / ftp_proxy environment variable as follows:<br />
<code>export http_proxy="http://username:password@proxy.example.com:8080"</code></p>
<div class="shr-publisher-1256"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=5AyUMTlC_Ew:0Cg2ry1yIrc:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/linux/how-to-use-wget-through-proxy.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exim Commands</title>
		<link>http://sysnetpro.net/email-server/exim-commands.html</link>
		<comments>http://sysnetpro.net/email-server/exim-commands.html#comments</comments>
		<pubDate>Thu, 23 May 2013 09:43:03 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Email server]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[cpanel]]></category>
		<category><![CDATA[directadmin]]></category>
		<category><![CDATA[email server]]></category>
		<category><![CDATA[exim]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=2302</guid>
		<description><![CDATA[Check emails in mail queue root@server [~]# exim -bp Count number of emails in mail queue root@server [~]# exim -bpc Count number of frozen emails in mail queue root@server [~]# exim -bp &#124; grep frozen &#124; wc -l Delete forzen emails from the mail queue exim -bp &#124; awk ‘$6~”frozen” { print $3 }’ &#124; [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Check emails in mail queue</p>
<pre class="brush:plain">root@server [~]# exim -bp</pre>
<p>Count number of emails in mail queue</p>
<pre class="brush:plain">root@server [~]# exim -bpc</pre>
<p>Count number of frozen emails in mail queue</p>
<pre class="brush:plain">root@server [~]# exim -bp | grep frozen | wc -l</pre>
<p>Delete forzen emails from the mail queue</p>
<pre class="brush:shell">exim -bp | awk ‘$6~”frozen” { print $3 }’ | xargs exim -Mrm</pre>
<p>Count emails for an email account/domain</p>
<pre class="brush:shell">exim -bp | grep username@domain.com | wc -l</pre>
<p>Delete emails for an email account</p>
<pre class="brush:shell">exim -bp | grep username@domain.com | awk ‘{print $3}’ | xargs exim -Mrm ;</pre>
<p>Delete emails sent through scripts</p>
<pre class="brush:shell">exim -bp | grep “&lt;&gt;” | awk {’print $3}’ | xargs exim -Mrm</pre>
<p>Count number of emails in queue for a domain/email account</p>
<pre class="brush:shell">exim -bp | tr ‘\n’ + | sed -e “s/++/=/g” | tr -d + | tr = ‘\n’ | awk ‘{print $5}’ | sort -n | uniq -c | sort -n</pre>
<p>Delete emails for root</p>
<pre class="brush:shell">exim -bp | grep root@server.hostname.com | awk ‘{print $3}’ | xargs exim -Mrm ;</pre>
<div class="shr-publisher-2302"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=Jde19elUZig:HT6NwfKFjRg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/email-server/exim-commands.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How Do I Secure Grub Boot Loader?</title>
		<link>http://sysnetpro.net/os/linux/how-do-i-secure-grub-boot-loader.html</link>
		<comments>http://sysnetpro.net/os/linux/how-do-i-secure-grub-boot-loader.html#comments</comments>
		<pubDate>Wed, 22 May 2013 21:40:46 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[grub]]></category>
		<category><![CDATA[grub boot loader]]></category>
		<category><![CDATA[password]]></category>
		<category><![CDATA[red hat fedora]]></category>
		<category><![CDATA[single user mode]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1824</guid>
		<description><![CDATA[You can set a password for the GRUB bootloader. This prevents users from entering single user mode or changing settings at boot time. When your system is rebooted, grub presents the boot option menu. From this menu one can easily login into a single user mode without the password which might result into compromise system [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>You can set a password for the GRUB bootloader. This prevents users from entering single user mode or changing settings at boot time.</p>
<p>When your system is rebooted, grub presents the boot option menu. From this menu one can easily login into a single user mode without the password which might result into compromise system security.</p>
<p>For example, anyone can access the data or change the settings. However you can setup a password for grub with password option. This option forces grub to ask for a password before making any changes or entering into single user mode. You need to type p followed by password.</p>
<h2>#1: Create A Password For Grub</h2>
<p>Type grub-md5-crypt command to create password in MD5 format:<br />
<code># grub-md5-crypt</code>Output:</p>
<pre>Password:&lt;ENTER-YOUR-PASSWORD&gt;
Retype password:&lt;ENTER-YOUR-PASSWORD&gt;
$1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0</pre>
<p>Please note that you need to copy and paste the MD5 password ($1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0) to your configuration file. Use mouse to copy the same.</p>
<h2>#2 Add MD5 Password To Grub Configuration File</h2>
<p>Under Debian GNU/Linux the Grub configuration file is located at /boot/grub/menu.lst. (Red Hat / Fedora user use /boot/grub/grub.conf file)<br />
<code># vi /boot/grub/menu.lst</code><br />
Edit file and add a password line as follows:<br />
<code>password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0</code><br />
Here is my sample config file:</p>
<pre>default         0
timeout         5
password --md5 $1$NYoR71$Sgv6pxQ6LG4GXpfihIJyL0
title           Debian GNU/Linux, kernel 2.6.13.4-cust-en-smp
root           (hd0,0)
kernel        /boot/vmlinuz root=/dev/hda3 ro
savedefault
boot</pre>
<p>Save and close the file.</p>
<h4>Optional Settings for Dual Booting Computer</h4>
<p>If you dual boot with Windows XP/2000/7, consider adding lock command to Windows XP right after title command:</p>
<pre>title           Windows NT/2000/XP
lock
root            (hd0,1)
savedefault
makeactive
chainloader     +1</pre>
<p>Note the lock option can be also added to the failsafe entry too. For more information please read</p>
<ul>
<li>grub and grub-md5-crypt man pages</li>
<li>Read <a rel="nofollow" target="_blank" href="http://www.gnu.org/software/grub/manual/grub.html#Security">Grub seurity manual page</a> online.</li>
</ul>
<div class="shr-publisher-1824"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=pXkKKQcVIck:pDgLg_N6BaM:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/linux/how-do-i-secure-grub-boot-loader.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>FreeBSD &gt; which directories (PATHs) used to load device drivers (modules)?</title>
		<link>http://sysnetpro.net/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html</link>
		<comments>http://sysnetpro.net/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html#comments</comments>
		<pubDate>Wed, 22 May 2013 09:40:12 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[FreeBSD]]></category>
		<category><![CDATA[Loader]]></category>
		<category><![CDATA[module]]></category>
		<category><![CDATA[module path]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1619</guid>
		<description><![CDATA[The kldconfig utility displays or modifies the search path used by the kernel when loading modules using the kldload utility or the kldload syscall. You can also use sysctl command (the sysctl utility retrieves kernel state). Try any one of the following command as a root user: 1) To get PATH (or directories name) type [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>The kldconfig utility displays or modifies the search path used by the<br />
kernel when loading modules using the kldload utility or the<br />
kldload syscall. You can also use sysctl command (the sysctl utility retrieves kernel state). Try any one of the following command as a root user:</p>
<p>1) To get PATH (or directories name) type command:</p>
<p># sysctl kern.module_path</p>
<p>OR</p>
<p># kldconfig -r</p>
<p>2) The path can modified in /boot/loader.conf file, open this file and look for entry called <strong>module_path</strong>:</p>
<p># grep &#8220;modile_path&#8221; /boot/loader.conf</p>
<p><em>module_path=&#8221;/boot/kernel;/boot/modules;/modules;/new/path&#8221; </em></p>
<p>Note you must open /boot/loader.conf file to change path settings using text editor:</p>
<p># vi /boot/loader.conf</p>
<p>And make changes to file.</p>
<p>3) Reboot system to take effect.</p>
<p>4) Or on fly, you can add/append path using kldconfig utility, read man page for more info.</p>
<div class="shr-publisher-1619"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=mIP8bn-F6Hs:9bXx2NcVmfU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/linux/freebsd-which-directories-paths-used-to-load-device-drivers-modules.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Installing Nginx With PHP5 And MySQL Support On Debian Squeeze</title>
		<link>http://sysnetpro.net/web-server/nginx/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze.html</link>
		<comments>http://sysnetpro.net/web-server/nginx/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze.html#comments</comments>
		<pubDate>Tue, 21 May 2013 21:40:07 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[nginx]]></category>
		<category><![CDATA[Debian]]></category>
		<category><![CDATA[free open source]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[php5]]></category>
		<category><![CDATA[resource consumption]]></category>
		<category><![CDATA[rich feature]]></category>
		<category><![CDATA[root]]></category>
		<category><![CDATA[root user]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1534</guid>
		<description><![CDATA[Nginx (pronounced &#8220;engine x&#8221;) is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a Debian Squeeze server with PHP5 support (through FastCGI) and MySQL support. I do not issue any guarantee that this [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><a rel="nofollow" target="_blank" href="http://nginx.net/" target="_blank">Nginx</a> (pronounced &#8220;engine x&#8221;) is a free, open-source, high-performance HTTP server. Nginx is known for its stability, rich feature set, simple configuration, and low resource consumption. This tutorial shows how you can install Nginx on a Debian Squeeze server with PHP5 support (through FastCGI) and MySQL support.</p>
<p>I do not issue any guarantee that this will work for you!</p>
<p>&nbsp;</p>
<h3>1 Preliminary Note</h3>
<p>In this tutorial I use the hostname server1.example.com with the IP address 192.168.0.100. These settings might differ for you, so you have to replace them where appropriate.</p>
<p>&nbsp;</p>
<h3>2 Installing MySQL 5</h3>
<p>In order to install MySQL, we run</p>
<p>apt-get install mysql-server mysql-client</p>
<p>You will be asked to provide a password for the MySQL root user &#8211; this password is valid for the user root@localhost as well as root@server1.example.com, so we don&#8217;t have to specify a MySQL root password manually later on:</p>
<p>New password for the MySQL &#8220;root&#8221; user: &lt;&#8211; yourrootsqlpassword<br />
Repeat password for the MySQL &#8220;root&#8221; user: &lt;&#8211; yourrootsqlpassword</p>
<p>&nbsp;</p>
<h3>3 Installing Nginx</h3>
<p>Nginx is available as a package for Debian Squeeze which we can install as follows:</p>
<p>apt-get install nginx</p>
<p>Start nginx afterwards:</p>
<p>/etc/init.d/nginx start</p>
<p>The default nginx document root is /var/www which does not exist yet; therefore we must create it as follows:</p>
<p>mkdir /var/www<br />
chown www-data:www-data /var/www</p>
<p>Type in your web server&#8217;s IP address or hostname into a browser (e.g. http://192.168.0.100), and you should see the following page:</p>
<p><a rel="nofollow" target="_blank" href="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/big/1.png"><img src="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/1.png" alt="1 Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " width="550" height="399" title="Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " /></a></p>
<div><a rel="nofollow" target="_blank" href="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/big/1.png"><img src="http://static.howtoforge.com/images/click_to_enlarge.png" alt="click to enlarge Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " width="100" height="12" border="0" title="Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " /> </a></div>
<p>You get a 403 forbidden error because there&#8217;s no index page in /var/www.</p>
<p>&nbsp;</p>
<h3>4 Installing PHP5</h3>
<p>We can make PHP5 work in nginx through FastCGI. Fortunately, Debian Squeeze provides a FastCGI-enabled PHP5 package which we install like this (together with some PHP5 modules like php5-mysql which you need if you want to use MySQL from your PHP scripts):</p>
<p>apt-get install php5-cgi php5-mysql php5-curl php5-gd php5-idn php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl</p>
<p>Then open /etc/php5/cgi/php.ini and uncomment the line cgi.fix_pathinfo=1:</p>
<p>vi /etc/php5/cgi/php.ini</p>
<table width="90%" border="1" cellspacing="0" cellpadding="2" align="center" bgcolor="#cccccc">
<tbody>
<tr>
<td>
<pre>[...]
; cgi.fix_pathinfo provides *real* PATH_INFO/PATH_TRANSLATED support for CGI.  PHP's
; previous behaviour was to set PATH_TRANSLATED to SCRIPT_FILENAME, and to not grok
; what PATH_INFO is.  For more information on PATH_INFO, see the cgi specs.  Setting
; this to 1 will cause PHP CGI to fix its paths to conform to the spec.  A setting
; of zero causes PHP to behave as before.  Default is 1.  You should fix your scripts
; to use SCRIPT_FILENAME rather than PATH_TRANSLATED.
; http://php.net/cgi.fix-pathinfo
cgi.fix_pathinfo=1
[...]</pre>
</td>
</tr>
</tbody>
</table>
<p>There&#8217;s no standalone FastCGI daemon package for Debian Squeeze, therefore we use the spawn-fcgi program from lighttpd. We install lighttpd as follows:</p>
<p>apt-get install lighttpd</p>
<p>You will see an error message saying that lighttpd can&#8217;t start because port 80 is already in use:</p>
<p>Starting web server: lighttpd2011-02-24 01:43:18: (network.c.358) can&#8217;t bind to port:  80 Address already in use<br />
failed!<br />
invoke-rc.d: initscript lighttpd, action &#8221;start&#8221; failed.</p>
<p>That&#8217;s how it&#8217;s supposed to be because nginx is already listening on port 80. Run</p>
<p>update-rc.d -f lighttpd remove</p>
<p>so that lighttpd will not start at boot time.</p>
<p>We&#8217;ve installed lighttpd because we need just one program that comes with the package, /usr/bin/spawn-fcgi, which we can use to start FastCGI processes. Take a look at</p>
<p>spawn-fcgi &#8211;help</p>
<p>to learn more about it.</p>
<p>To start a PHP FastCGI daemon listening on port 9000 on localhost and running as the user and group www-data, we run the following command:</p>
<p>/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid</p>
<p>Of course, you don&#8217;t want to type in that command manually whenever you boot the system, so to have the system execute the command automatically at boot time, open /etc/rc.local&#8230;</p>
<p>vi /etc/rc.local</p>
<p>&#8230; and add the command at the end of the file (before the exit line):</p>
<table width="90%" border="1" cellspacing="0" cellpadding="2" align="center" bgcolor="#cccccc">
<tbody>
<tr>
<td>
<pre>[...]
/usr/bin/spawn-fcgi -a 127.0.0.1 -p 9000 -u www-data -g www-data -f /usr/bin/php5-cgi -P /var/run/fastcgi-php.pid
[...]</pre>
</td>
</tr>
</tbody>
</table>
<p>&nbsp;</p>
<h3>5 Configuring nginx</h3>
<p>The nginx configuration is in /etc/nginx/nginx.conf which we open now:</p>
<p>vi /etc/nginx/nginx.conf</p>
<p>The configuration is easy to understand (you can learn more about it here: <a rel="nofollow" target="_blank" href="http://wiki.codemongers.com/NginxFullExample" target="_blank">http://wiki.codemongers.com/NginxFullExample</a> and here: <a rel="nofollow" target="_blank" href="http://wiki.codemongers.com/NginxFullExample2" target="_blank">http://wiki.codemongers.com/NginxFullExample2</a>)</p>
<p>First (this is optional) increase the number of worker processes and set the keepalive_timeout to a reasonable value:</p>
<table width="90%" border="1" cellspacing="0" cellpadding="2" align="center" bgcolor="#cccccc">
<tbody>
<tr>
<td>
<pre>[...]
worker_processes  5;
[...]
    keepalive_timeout   2;
[...]</pre>
</td>
</tr>
</tbody>
</table>
<p>The virtual hosts are defined in server {} containers. The default vhost is defined in the file /etc/nginx/sites-available/default &#8211; let&#8217;s modify it as follows:</p>
<p>vi /etc/nginx/sites-available/default</p>
<table width="90%" border="1" cellspacing="0" cellpadding="2" align="center" bgcolor="#cccccc">
<tbody>
<tr>
<td>
<pre>[...]
server {

        listen   80; ## listen for ipv4
        listen   [::]:80 default ipv6only=on; ## listen for ipv6

        server_name  _;

        access_log  /var/log/nginx/localhost.access.log;

        location / {
                root   /var/www;
                index  index.php index.html index.htm;
        }

        location /doc {
                root   /usr/share;
                autoindex on;
                allow 127.0.0.1;
                deny all;
        }

        location /images {
                root   /usr/share;
                autoindex on;
        }

        #error_page  404  /404.html;

        # redirect server error pages to the static page /50x.html
        #
        #error_page   500 502 503 504  /50x.html;
        #location = /50x.html {
        #       root   /var/www/nginx-default;
        #}

        # proxy the PHP scripts to Apache listening on 127.0.0.1:80
        #
        #location ~ \.php$ {
                #proxy_pass   http://127.0.0.1;
        #}

        # pass the PHP scripts to FastCGI server listening on 127.0.0.1:9000
        #
        location ~ \.php$ {
                fastcgi_pass   127.0.0.1:9000;
                fastcgi_index  index.php;
                fastcgi_param  SCRIPT_FILENAME  /var/www$fastcgi_script_name;
                include         fastcgi_params;
        }

        # deny access to .htaccess files, if Apache's document root
        # concurs with nginx's one
        #
        location ~ /\.ht {
                deny  all;
        }
}
[...]</pre>
</td>
</tr>
</tbody>
</table>
<p>server_name _; makes this a default catchall vhost (of course, you can as well specify a hostname here like www.example.com).</p>
<p>In the location / part, I&#8217;ve added index.php to the index line. root /var/www; means that the document root is the directory /var/www.</p>
<p>The important part for PHP is the location ~ \.php$ {} stanza. Uncomment it to enable it. Please make sure that you change the fastcgi_param line to fastcgi_param SCRIPT_FILENAME /var/www$fastcgi_script_name; (replace /var/www with your vhost&#8217;s document root) because otherwise the PHP interpreter won&#8217;t find the PHP script that you call in your browser.</p>
<p>Make sure that there are some spaces between include and fastcgi_params; &#8211; in the default file this is written as one word which is a bug.</p>
<p>Now save the file and restart nginx:</p>
<p>/etc/init.d/nginx restart</p>
<p>Now create the following PHP file in the document root /var/www:</p>
<p>vi /var/www/info.php</p>
<table width="90%" border="1" cellspacing="0" cellpadding="2" align="center" bgcolor="#cccccc">
<tbody>
<tr>
<td>
<pre>&lt;?php
phpinfo();
?&gt;</pre>
</td>
</tr>
</tbody>
</table>
<p>Now we call that file in a browser (e.g. http://192.168.0.100/info.php):</p>
<p><a rel="nofollow" target="_blank" href="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/big/2.png"><img src="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/2.png" alt="2 Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " width="550" height="399" title="Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " /></a></p>
<div><a rel="nofollow" target="_blank" href="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/big/2.png"><img src="http://static.howtoforge.com/images/click_to_enlarge.png" alt="click to enlarge Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " width="100" height="12" border="0" title="Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " /> </a></div>
<p>As you see, PHP5 is working, and it&#8217;s working through FastCGI, as shown in the Server API line. If you scroll further down, you will see all modules that are already enabled in PHP5, including the MySQL module:</p>
<p><a rel="nofollow" target="_blank" href="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/big/3.png"><img src="http://static.howtoforge.com/images/nginx_php5_mysql5_debian_squeeze/3.png" alt="3 Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " width="550" height="399" title="Installing Nginx With PHP5 And MySQL Support On Debian Squeeze " /></a></p>
<p>&nbsp;</p>
<h3>6 Links</h3>
<ul>
<li>nginx: <a rel="nofollow" target="_blank" href="http://nginx.net/" target="_blank">http://nginx.net/</a></li>
<li>nginx Wiki: <a rel="nofollow" target="_blank" href="http://wiki.codemongers.com/Main" target="_blank">http://wiki.codemongers.com/Main</a></li>
<li>PHP: <a rel="nofollow" target="_blank" href="http://www.php.net/" target="_blank">http://www.php.net/</a></li>
<li>MySQL: <a rel="nofollow" target="_blank" href="http://www.mysql.com/" target="_blank">http://www.mysql.com/</a></li>
<li>Debian: <a rel="nofollow" target="_blank" href="http://www.debian.org/" target="_blank">http://www.debian.org/</a></li>
</ul>
<div class="shr-publisher-1534"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=Ei8WG11RyBg:FIonB8kME34:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/web-server/nginx/installing-nginx-with-php5-and-mysql-support-on-debian-squeeze.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Corrupted or Missing \WINDOWS\SYSTEM32\CONFIG</title>
		<link>http://sysnetpro.net/os/windows/corrupted-or-missing-windowssystem32config.html</link>
		<comments>http://sysnetpro.net/os/windows/corrupted-or-missing-windowssystem32config.html#comments</comments>
		<pubDate>Tue, 21 May 2013 09:40:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[windows]]></category>
		<category><![CDATA[Insert]]></category>
		<category><![CDATA[installation]]></category>
		<category><![CDATA[Press]]></category>
		<category><![CDATA[repair option]]></category>
		<category><![CDATA[section]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=1200</guid>
		<description><![CDATA[If you get the error: Windows could not start because the following files is missing or corrupt \WINDOWS\SYSTEM32\CONFIG\SYSTEM or \WINDOWS\SYSTEM32\CONFIG\SOFTWARE Insert and boot from your WindowsXP CD. At the first R=Repair option, press the R key Press the number that corresponds to the correct location for the installation of Windows you want to repair. Typically [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>If you get the error:<br />
<em>Windows could not start because the following files is missing or corrupt<br />
</em>\WINDOWS\SYSTEM32\CONFIG\SYSTEM or \WINDOWS\SYSTEM32\CONFIG\SOFTWARE</p>
<ol>
<li>Insert and boot from your WindowsXP CD.</li>
<li>At the first R=Repair option, press the R key</li>
<li>Press the number that corresponds to the correct location for the installation of Windows you want to repair.<br />
Typically this will be #1</li>
<li>Enter in the administrator password when requested</li>
<li>cd \windows\system32\config</li>
<li>Depending on which section was corrupted:<br />
ren software software.bad or ren system system.bad</li>
<li>Depending on which section was corrupted<br />
copy \windows\repair\system<br />
copy \windows\repair\software</li>
<li>Take out the CD ROM and type exit</li>
</ol>
<div class="shr-publisher-1200"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=lFMlokTiCgs:rV94MIxmXek:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/windows/corrupted-or-missing-windowssystem32config.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tuning the Apache MaxClients parameter</title>
		<link>http://sysnetpro.net/web-server/apache/tuning-the-apache-maxclients-parameter.html</link>
		<comments>http://sysnetpro.net/web-server/apache/tuning-the-apache-maxclients-parameter.html#comments</comments>
		<pubDate>Mon, 20 May 2013 21:40:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Apache]]></category>
		<category><![CDATA[Excessive Thrashing]]></category>
		<category><![CDATA[memory size]]></category>
		<category><![CDATA[physical memory]]></category>
		<category><![CDATA[system]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=585</guid>
		<description><![CDATA[This parameter defines how many simultaneous request can be served. Any connection request from browsers that come in after that will be queued. Apache prefork, StartServers, MaxSpareServers and MinSpareServers In the most common case, you will be using Apache in the prefork mode, meaning one process per connection, with a pool of processes pre-forked to [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>This parameter defines how many simultaneous request can be served. Any connection request from browsers that come in after that will be queued.</p>
<h2>Apache prefork, StartServers, MaxSpareServers and MinSpareServers</h2>
<p>In the most common case, you will be using Apache in the prefork mode, meaning one process per connection, with a pool of processes pre-forked to standby for connections. The number of spare processes is defined by the values <a rel="nofollow" target="_blank" href="http://httpd.apache.org/docs/2.0/mod/prefork.html#maxspareservers" target="_blank">MaxSpareServers</a>, <a rel="nofollow" target="_blank" href="http://httpd.apache.org/docs/2.0/mod/prefork.html#minspareservers" target="_blank">MinSpareServers</a>, while the number to start is defined by <a rel="nofollow" target="_blank" href="http://httpd.apache.org/docs/2.0/mod/mpm_common.html#startservers" target="_blank">StartServers</a>.</p>
<h2>Maxclients default</h2>
<p>By default, the MaxClients parameter has a compiled in hard limit of 256. This can be changed by recompiling Apache however. Some distributions, or hosting companies raise this limit to a very high value, such as 512 or even 1024 in order to cope with large loads.</p>
<p>While this makes sense when the web server is serving static content (plain HTML, images, …etc.), it can be detrimental to a dynamic web application like Drupal. So often, we have clients calling because their web server has grind to a halt, and the reason would be a too high MaxClients value.</p>
<h2>A web site’s nemesis: Excessive Thrashing</h2>
<p>The reason is that if your web site experiences a traffic spike, or if there is a bottleneck in the database, incoming requests cause new processes to be forked at a rate higher than old processes can service the older connections. This causes a condition where the system keeps creating new processes that overflow the available memory and starts to use the swap space. This almost always causes <a rel="nofollow" target="_blank" href="http://en.wikipedia.org/wiki/Thrash_%28computer_science%29" target="_blank">thrashing</a>, where the system is just swapping pages from physical memory to virtual memory (on disk), and vice versa, without doing any real work. You can detect if thrashing has occurred by using the vmstat command.</p>
<p>A simple calculation for MaxClients on a system that does only Drupal would be:</p>
<blockquote><p>(Total Memory – Operating System Memory – MySQL memory) / Size Per Apache process.</p></blockquote>
<p>If your hosting company configured your server with all sorts of bells and whistles (like mod_perl, mod_python, in addition to mod_php), then Apache can easily be 21 MB per process. If your server has 512MB, then you can fit some 20 Apache processes. If you tune Apache well, and remove all the unneeded modules, and install a PHP op-code cache/accelerator, then you can make each Apache process take as little as 12 MB. These figures depend on how many modules you have loaded, how big they are, so there is no hard and fast rule. Even if one has 1GB of memory, and leaves 250 MB for the system and MySQL, with an Apache process of 15MB, this means 50 Apache processes can fit in the remaining 750MB.</p>
<p>Remember that you need memory for the operating system, as well as for MySQL. The more you give the system and MySQL memory, the more caching of the file system they do for you and avoid hitting disk, so do not use the very last available memory for MaxClients.</p>
<h2>Tuning the ServerLimit</h2>
<p>On some systems, there is another parameter that  sets an upper limit if MySQL. So for example, if ServerLimit is set by default to 256, and you want to increase MaxClients to 300, you will not be able to do so, until you set ServerLimit to 300 as well. Normally, you would see a warning message from Apache when you restart it to tell you that this needs to be done.</p>
<h2>Conclusion</h2>
<p>If you cannot do a proper calculation, then it is safest to start with a conservative number, e.g. 60 to 150 on a 2GB system, and then increase it as you monitor the usage of the system over a few weeks. By all means, do not keep it at the 512 value that came with your server/distribution until you know how much load you can handle.</p>
<div class="shr-publisher-585"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=c4x9gLUr3wM:zlQr2MeYIMg:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/web-server/apache/tuning-the-apache-maxclients-parameter.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to defragment or optimize a database in Mysql?</title>
		<link>http://sysnetpro.net/database-server/mysql/how-to-defragment-or-optimize-a-database-in-mysql.html</link>
		<comments>http://sysnetpro.net/database-server/mysql/how-to-defragment-or-optimize-a-database-in-mysql.html#comments</comments>
		<pubDate>Mon, 20 May 2013 09:41:17 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Mysql]]></category>
		<category><![CDATA[structure]]></category>
		<category><![CDATA[VARCHAR]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=885</guid>
		<description><![CDATA[In case you remove a lot of data from the tables OR change the database structure, a de-fragmentation/optimizing of the database is necessary to avoid performance loss, especially while running queries. The above changes results in a performance loss, so make sure you run the “optimizer” on the database. SSH to your server and execute: [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p><strong>In case you remove a lot of data from the tables OR change the database structure, a de-fragmentation/optimizing<strong></strong> of the database is necessary to avoid performance loss, especially while running queries.</strong> The above changes results in a performance loss, so make sure you run the “optimizer” on the database.</p>
<p>SSH to your server and execute:</p>
<blockquote>
<pre><strong>mysqlcheck -o &lt;databasename&gt;</strong></pre>
</blockquote>
<p>where, <strong>-o stands for optimize</strong> which is similar to defragmentation. You should look to defragment the tables regularly when using VARCHAR fields since these coloumns get fragmented too often.</p>
<div class="shr-publisher-885"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=pSoD_FYyY8E:Nst695AvkJU:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/database-server/mysql/how-to-defragment-or-optimize-a-database-in-mysql.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Automatically reboot server after a kernel panic</title>
		<link>http://sysnetpro.net/os/linux/automatically-reboot-server-after-a-kernel-panic.html</link>
		<comments>http://sysnetpro.net/os/linux/automatically-reboot-server-after-a-kernel-panic.html#comments</comments>
		<pubDate>Sun, 19 May 2013 21:39:40 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[centos]]></category>
		<category><![CDATA[kernel]]></category>
		<category><![CDATA[linux]]></category>
		<category><![CDATA[server]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=284</guid>
		<description><![CDATA[Add panic=10 to the kernel command line to reboot with 10 seconds of a kernel error. Be careful with this when setting up new kernels. It’s possible to change it later with sysctl, or by writing to /proc: # echo 10 &#62; /proc/sys/kernel/panic To make it permanent, edit /etc/sysctl.conf and add the below line: kernel.panic [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>Add panic=10 to the kernel command line to reboot with 10 seconds of a kernel error. Be careful with this when setting up new kernels.</p>
<p>It’s possible to change it later with sysctl, or by writing to /proc:</p>
<div><code># echo 10 &gt; /proc/sys/kernel/panic</code></div>
<p>To make it permanent, edit /etc/sysctl.conf and add the below line:</p>
<div><code>kernel.panic = 10</code></div>
<p>`sysctl -p` to load the conf file and make permanent.</p>
<h4>Incoming search terms:</h4><ul><li><a href="http://sysnetpro.net/os/linux/automatically-reboot-server-after-a-kernel-panic.html" title="centos reboot server">centos reboot server</a> (1)</li></ul><div class="shr-publisher-284"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=88nDdLH43K4:hxtZG_AtVC8:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/linux/automatically-reboot-server-after-a-kernel-panic.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Finding Files On The Command Line</title>
		<link>http://sysnetpro.net/os/linux/finding-files-on-the-command-line.html</link>
		<comments>http://sysnetpro.net/os/linux/finding-files-on-the-command-line.html#comments</comments>
		<pubDate>Sun, 19 May 2013 09:40:39 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Linux]]></category>
		<category><![CDATA[file]]></category>
		<category><![CDATA[GNU]]></category>
		<category><![CDATA[linux]]></category>

		<guid isPermaLink="false">http://thegioinguonmo.com/?p=310</guid>
		<description><![CDATA[One of the things I like about Linux is the command line. I have used nautilus, gnome-commander, konqueror, kommander, dolphin and thunar to manage files in Linux and these file managers are great for what they do. But there are times when one simply wants to find a file when working on the command line [...]]]></description>
			<content:encoded><![CDATA[<!-- Start Shareaholic LikeButtonSetTop Automatic --><!-- End Shareaholic LikeButtonSetTop Automatic --><p>One of the things I like about Linux is the command line. I have used nautilus, gnome-commander, konqueror, kommander, dolphin and thunar to manage files in Linux and these file managers are great for what they do. But there are times when one simply wants to find a file when working on the command line without having to open a GUI application.</p>
<p>From the find man page:</p>
<p><em>GNU find searches the directory tree rooted at each given file name by evaluating the given expression from left to right, according to the rules of precedence until the outcome is known at which point find moves on to the next file name.</em></p>
<p>Find empty directories:</p>
<p>find /path -depth -type d -empty</p>
<p>Find empty files:</p>
<p>find /path -depth -type f -empty</p>
<p>Find a file with a specific name:</p>
<p>find /path -name name_of_file</p>
<p>Find a files with specific extensions:</p>
<p>find /path -name “*.given_extension”</p>
<p>Find files with specific permissions which have a “.txt. file extension:</p>
<p>find /path -name ‘*.txt’ -perm 644</p>
<p>Find files with some given permissions:</p>
<p>find /path -perm -permision_bits</p>
<p>Find files with a given name and any extension:</p>
<p>find /path -name ‘given_name.*’</p>
<p>Find files modified in the latest blocks of 24 hours:</p>
<p>find /path -mtime n</p>
<p>Where n is:</p>
<ul>
<li>0 for the last 24 hours</li>
<li>1 for the last 48 hours</li>
<li>2 for the last 72 hours</li>
</ul>
<p>Find files that were accessed in the latest blocks of 24 hours:</p>
<p>find -atime n</p>
<p>Where n is:</p>
<ul>
<li>0 for the last 24 hours</li>
<li>1 for the last 48 hours</li>
<li>2 for the last 72 hours</li>
</ul>
<p>Find files according to owner:</p>
<p>find /path -user root</p>
<p>One can also pipe find commands to the xargs command to execute commands on files.</p>
<p>Find and delete files:</p>
<p>find /path -name mytestfile | xargs rm</p>
<p>See man find and man xargs for more information about these powerful commands.</p>
<p>Many new Linux users are intimidated by the command line and this feeling should be overcome from the onset because the command line can be faster and more powerful than most GUI applications.</p>
<div class="shr-publisher-310"></div><!-- Start Shareaholic LikeButtonSetBottom Automatic --><!-- End Shareaholic LikeButtonSetBottom Automatic --><div class="feedflare">
<a href="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?a=ag8E1nIPoDI:hzq9SSqcbDQ:yIl2AUoC8zA"><img src="http://feeds.feedburner.com/~ff/SystemNetworkProgrammingSolution-Linux-Windows-Centos-Security-Cpanel-Plesk-directadminHelm?d=yIl2AUoC8zA" border="0"></img></a>
</div>]]></content:encoded>
			<wfw:commentRss>http://sysnetpro.net/os/linux/finding-files-on-the-command-line.html/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	<media:rating>nonadult</media:rating></channel>
</rss><!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: sysnetpro.net @ 2013-05-24 12:03:29 -->
