<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.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:creativeCommons="http://backend.userland.com/creativeCommonsRssModule" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">

<channel>
	<title>Linux Ask!</title>
	
	<link>http://www.linuxask.com</link>
	<description>Your question, Our answer.</description>
	<lastBuildDate>Tue, 09 Mar 2010 15:03:45 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<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/linuxask" /><feedburner:info uri="linuxask" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><creativeCommons:license>http://creativecommons.org/licenses/by-nc-nd/2.0/</creativeCommons:license><item>
		<title>Speedup sed search and replace</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/p7bkrO8rSn8/speedup-sed-search-and-replace</link>
		<comments>http://www.linuxask.com/questions/speedup-sed-search-and-replace#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:03:45 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Advanced Linux]]></category>
		<category><![CDATA[sed]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1466</guid>
		<description><![CDATA[Speedup sed search and replace
Answer:
If you have a very large file, sometimes you can speed up sed by using the following method:
Original method:
# sed 's/foo/bar/g' filename 
Optimized method:
# sed '/foo/ s/foo/bar/g' filename 
The second method is faster since substitution is only performed when the search string is found.


Related posts:Search and replace string in file using [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/search-and-replace-string-in-file-using-perl' rel='bookmark' title='Permanent Link: Search and replace string in file using Perl'>Search and replace string in file using Perl</a></li>
<li><a href='http://www.linuxask.com/questions/replace-multiple-strings-using-sed' rel='bookmark' title='Permanent Link: Replace multiple strings using sed'>Replace multiple strings using sed</a></li>
<li><a href='http://www.linuxask.com/questions/replace-a-string-using-regular-expressions-in-perl' rel='bookmark' title='Permanent Link: Replace a string using regular expressions in Perl'>Replace a string using regular expressions in Perl</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Speedup sed search and replace</p>
<p><strong>Answer:</strong></p>
<p>If you have a very large file, sometimes you can speed up <strong>sed </strong>by using the following method:</p>
<p><strong>Original method:</strong></p>
<p><code># sed 's/foo/bar/g' filename </code></p>
<p><strong>Optimized method:</strong></p>
<p><code># sed '/foo/ s/foo/bar/g' filename </code></p>
<p>The second method is faster since substitution is only performed when the search string is found.</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/search-and-replace-string-in-file-using-perl' rel='bookmark' title='Permanent Link: Search and replace string in file using Perl'>Search and replace string in file using Perl</a></li>
<li><a href='http://www.linuxask.com/questions/replace-multiple-strings-using-sed' rel='bookmark' title='Permanent Link: Replace multiple strings using sed'>Replace multiple strings using sed</a></li>
<li><a href='http://www.linuxask.com/questions/replace-a-string-using-regular-expressions-in-perl' rel='bookmark' title='Permanent Link: Replace a string using regular expressions in Perl'>Replace a string using regular expressions in Perl</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/p7bkrO8rSn8" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/speedup-sed-search-and-replace/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/speedup-sed-search-and-replace</feedburner:origLink></item>
		<item>
		<title>Quickly open to file and position a cursor with vim</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/cfGAaes4JZw/quickly-open-to-file-and-position-a-cursor-with-vim</link>
		<comments>http://www.linuxask.com/questions/quickly-open-to-file-and-position-a-cursor-with-vim#comments</comments>
		<pubDate>Tue, 09 Mar 2010 13:22:57 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[vi]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1469</guid>
		<description><![CDATA[Quickly open to file and position a cursor with vim
Answer:
To open a file and automatically move the cursor to a particular line number
# vi +80 test.txt
The vim will move the cursor to line 80 when opened the file.


Related posts:How to adjust the argument position in xargs?
Increase the maximum number of open files / file descriptors
Open [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-adjust-the-argument-position-in-xargs' rel='bookmark' title='Permanent Link: How to adjust the argument position in xargs?'>How to adjust the argument position in xargs?</a></li>
<li><a href='http://www.linuxask.com/questions/increase-the-maximum-number-of-open-files-file-descriptors' rel='bookmark' title='Permanent Link: Increase the maximum number of open files / file descriptors'>Increase the maximum number of open files / file descriptors</a></li>
<li><a href='http://www.linuxask.com/questions/open-a-tcp-port-in-ubuntus-ufw-firewall' rel='bookmark' title='Permanent Link: Open a TCP port in Ubuntu&#8217;s ufw firewall'>Open a TCP port in Ubuntu&#8217;s ufw firewall</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Quickly open to file and position a cursor with vim</p>
<p><strong>Answer:</strong></p>
<p>To open a file and automatically move the cursor to a particular line number</p>
<p><code># vi +80 test.txt</code></p>
<p>The vim will move the cursor to line 80 when opened the file.</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-adjust-the-argument-position-in-xargs' rel='bookmark' title='Permanent Link: How to adjust the argument position in xargs?'>How to adjust the argument position in xargs?</a></li>
<li><a href='http://www.linuxask.com/questions/increase-the-maximum-number-of-open-files-file-descriptors' rel='bookmark' title='Permanent Link: Increase the maximum number of open files / file descriptors'>Increase the maximum number of open files / file descriptors</a></li>
<li><a href='http://www.linuxask.com/questions/open-a-tcp-port-in-ubuntus-ufw-firewall' rel='bookmark' title='Permanent Link: Open a TCP port in Ubuntu&#8217;s ufw firewall'>Open a TCP port in Ubuntu&#8217;s ufw firewall</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/cfGAaes4JZw" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/quickly-open-to-file-and-position-a-cursor-with-vim/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/quickly-open-to-file-and-position-a-cursor-with-vim</feedburner:origLink></item>
		<item>
		<title>Count the number of matching lines from grep</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/6qOLOtq3PBc/count-the-number-of-matching-lines-from-grep</link>
		<comments>http://www.linuxask.com/questions/count-the-number-of-matching-lines-from-grep#comments</comments>
		<pubDate>Mon, 08 Mar 2010 13:39:48 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1462</guid>
		<description><![CDATA[Count the number of matching lines from grep
Answer:
grep  command is useful for searching file's content by a key string, e.g.
# grep foo text.txt 
All the lines matching foo will be printed.
However, to only print the number of matching lines, you can use the -c flag
# grep -c foo text.txt
4
There are total 4 lines match [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-count-the-number-of-duplicated-lines-in-a-file' rel='bookmark' title='Permanent Link: How to count the number of duplicated lines in a file'>How to count the number of duplicated lines in a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-count-the-number-of-line-in-a-file' rel='bookmark' title='Permanent Link: How to count the number of line in a file'>How to count the number of line in a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-grep-a-string-in-a-binary-file' rel='bookmark' title='Permanent Link: How to grep a string in a binary file?'>How to grep a string in a binary file?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Count the number of matching lines from grep</p>
<p><strong>Answer:</strong></p>
<p><strong>grep </strong> command is useful for searching file's content by a key string, e.g.</p>
<p><code># grep foo text.txt</code> </p>
<p>All the lines matching <strong>foo </strong>will be printed.</p>
<p>However, to only print the number of matching lines, you can use the <strong>-c</strong> flag</p>
<pre><code># grep -c foo text.txt
4</code></pre>
<p>There are total 4 lines match the word <strong>foo</strong>.</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-count-the-number-of-duplicated-lines-in-a-file' rel='bookmark' title='Permanent Link: How to count the number of duplicated lines in a file'>How to count the number of duplicated lines in a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-count-the-number-of-line-in-a-file' rel='bookmark' title='Permanent Link: How to count the number of line in a file'>How to count the number of line in a file</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-grep-a-string-in-a-binary-file' rel='bookmark' title='Permanent Link: How to grep a string in a binary file?'>How to grep a string in a binary file?</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/6qOLOtq3PBc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/count-the-number-of-matching-lines-from-grep/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/count-the-number-of-matching-lines-from-grep</feedburner:origLink></item>
		<item>
		<title>Installing Python modules with easy_install</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/fdU2JKxkMG0/installing-python-modules-with-easy_install</link>
		<comments>http://www.linuxask.com/questions/installing-python-modules-with-easy_install#comments</comments>
		<pubDate>Sun, 07 Mar 2010 15:17:34 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Python]]></category>
		<category><![CDATA[Ubuntu]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1459</guid>
		<description><![CDATA[Installing Python modules with easy_install
Answer:
Install Python modules cannot be easier with easy_install.
To use easy_install, you can use apt-get to install the "python-setuptools" package
# sudo apt-get install python-setuptools
Then you can use easy_install to install the module you want, e.g. pymongo
# sudo easy_install pymongo


Related posts:How to perform syntax check for Python program
How to remove install CPAN modules?
Install [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program' rel='bookmark' title='Permanent Link: How to perform syntax check for Python program'>How to perform syntax check for Python program</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-remove-install-cpan-modules' rel='bookmark' title='Permanent Link: How to remove install CPAN modules?'>How to remove install CPAN modules?</a></li>
<li><a href='http://www.linuxask.com/questions/install-apc-for-php-on-ubuntu' rel='bookmark' title='Permanent Link: Install APC for PHP on Ubuntu'>Install APC for PHP on Ubuntu</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Installing Python modules with easy_install</p>
<p><strong>Answer:</strong></p>
<p>Install Python modules cannot be easier with <strong>easy_install</strong>.</p>
<p>To use <strong>easy_install</strong>, you can use apt-get to install the <strong>"python-setuptools"</strong> package</p>
<p><code># sudo apt-get install python-setuptools</code></p>
<p>Then you can use<strong> easy_install </strong>to install the module you want, e.g. <strong>pymongo</strong></p>
<p><code># sudo easy_install pymongo</code></p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program' rel='bookmark' title='Permanent Link: How to perform syntax check for Python program'>How to perform syntax check for Python program</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-remove-install-cpan-modules' rel='bookmark' title='Permanent Link: How to remove install CPAN modules?'>How to remove install CPAN modules?</a></li>
<li><a href='http://www.linuxask.com/questions/install-apc-for-php-on-ubuntu' rel='bookmark' title='Permanent Link: Install APC for PHP on Ubuntu'>Install APC for PHP on Ubuntu</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/fdU2JKxkMG0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/installing-python-modules-with-easy_install/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/installing-python-modules-with-easy_install</feedburner:origLink></item>
		<item>
		<title>How to pronounce Gnome?</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/uPK8EEmfwHA/how-to-pronounce-gnome</link>
		<comments>http://www.linuxask.com/questions/how-to-pronounce-gnome#comments</comments>
		<pubDate>Sun, 07 Mar 2010 02:07:54 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[GNOME]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1457</guid>
		<description><![CDATA[How to pronounce Gnome?
Answer:
The official pronunciation is "ga-nome", but most people say "nome"


Related posts:SSHMenu: SSH connections manager for GNOME
Serve current directory using HTTP with a single command
What is the euqivilant of i-tunes for Linux?



Related posts:<ol><li><a href='http://www.linuxask.com/questions/sshmenu-ssh-connections-manager-for-gnome' rel='bookmark' title='Permanent Link: SSHMenu: SSH connections manager for GNOME'>SSHMenu: SSH connections manager for GNOME</a></li>
<li><a href='http://www.linuxask.com/questions/serve-current-directory-using-http-with-a-single-command' rel='bookmark' title='Permanent Link: Serve current directory using HTTP with a single command'>Serve current directory using HTTP with a single command</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-euqivilant-of-i-tunes-for-linux' rel='bookmark' title='Permanent Link: What is the euqivilant of i-tunes for Linux?'>What is the euqivilant of i-tunes for Linux?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to pronounce Gnome?</p>
<p><strong>Answer:</strong></p>
<p>The official pronunciation is "<strong>ga-nome</strong>", but most people say "<a href="http://www.howjsay.com/index.php?word=gnome&#038;submit=Submit"><strong>nome</strong></a>"</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/sshmenu-ssh-connections-manager-for-gnome' rel='bookmark' title='Permanent Link: SSHMenu: SSH connections manager for GNOME'>SSHMenu: SSH connections manager for GNOME</a></li>
<li><a href='http://www.linuxask.com/questions/serve-current-directory-using-http-with-a-single-command' rel='bookmark' title='Permanent Link: Serve current directory using HTTP with a single command'>Serve current directory using HTTP with a single command</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-euqivilant-of-i-tunes-for-linux' rel='bookmark' title='Permanent Link: What is the euqivilant of i-tunes for Linux?'>What is the euqivilant of i-tunes for Linux?</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/uPK8EEmfwHA" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-pronounce-gnome/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/how-to-pronounce-gnome</feedburner:origLink></item>
		<item>
		<title>SSHMenu: SSH connections manager for GNOME</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/jL63Beq2wgU/sshmenu-ssh-connections-manager-for-gnome</link>
		<comments>http://www.linuxask.com/questions/sshmenu-ssh-connections-manager-for-gnome#comments</comments>
		<pubDate>Sat, 06 Mar 2010 02:02:31 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Internet]]></category>
		<category><![CDATA[Linux Security]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[GNOME]]></category>
		<category><![CDATA[ssh]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1454</guid>
		<description><![CDATA[SSHMenu: SSH connections manager for GNOME 
Answer:
SSHMenu is a GNOME panel applet* that keeps all your regular SSH connections within a single mouse click.

Highly recommended if you need to manage a lot of SSH sessions.
Official homepage: http://sshmenu.sourceforge.net/


Related posts:How to pronounce Gnome?
A better alternative to top
What is the euqivilant of i-tunes for Linux?



Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-pronounce-gnome' rel='bookmark' title='Permanent Link: How to pronounce Gnome?'>How to pronounce Gnome?</a></li>
<li><a href='http://www.linuxask.com/questions/a-better-alternative-to-top' rel='bookmark' title='Permanent Link: A better alternative to top'>A better alternative to top</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-euqivilant-of-i-tunes-for-linux' rel='bookmark' title='Permanent Link: What is the euqivilant of i-tunes for Linux?'>What is the euqivilant of i-tunes for Linux?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>SSHMenu: SSH connections manager for GNOME </p>
<p><strong>Answer:</strong></p>
<p><strong>SSHMenu </strong>is a GNOME panel applet* that keeps all your regular SSH connections within a single mouse click.</p>
<p><img src='http://sshmenu.sourceforge.net/images/sshmenu_screenshot.png' /></p>
<p>Highly recommended if you need to manage a lot of SSH sessions.</p>
<p>Official homepage: <a href='http://sshmenu.sourceforge.net/'>http://sshmenu.sourceforge.net/</a></p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-pronounce-gnome' rel='bookmark' title='Permanent Link: How to pronounce Gnome?'>How to pronounce Gnome?</a></li>
<li><a href='http://www.linuxask.com/questions/a-better-alternative-to-top' rel='bookmark' title='Permanent Link: A better alternative to top'>A better alternative to top</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-euqivilant-of-i-tunes-for-linux' rel='bookmark' title='Permanent Link: What is the euqivilant of i-tunes for Linux?'>What is the euqivilant of i-tunes for Linux?</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/jL63Beq2wgU" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/sshmenu-ssh-connections-manager-for-gnome/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/sshmenu-ssh-connections-manager-for-gnome</feedburner:origLink></item>
		<item>
		<title>Generate dummy file in Linux</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/FBoVI7dqU7E/generate-dummy-file-in-linux</link>
		<comments>http://www.linuxask.com/questions/generate-dummy-file-in-linux#comments</comments>
		<pubDate>Fri, 05 Mar 2010 15:50:54 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[filesystem]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1449</guid>
		<description><![CDATA[Generate dummy file in Linux
Answer:
To generate random files of fixed size (e.g. 1GB) in Linux:
dd if=/dev/zero of=test.bin bs=1000000000 count=1 
You can adjust the file size by setting the bs parameter (byte size).


Related posts:How to create a dummy file with a given size in Linux?
Generate random number in Linux
Generate random number in Perl



Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-create-a-dummy-file-with-a-given-size-in-linux' rel='bookmark' title='Permanent Link: How to create a dummy file with a given size in Linux?'>How to create a dummy file with a given size in Linux?</a></li>
<li><a href='http://www.linuxask.com/questions/generate-random-number-in-linux' rel='bookmark' title='Permanent Link: Generate random number in Linux'>Generate random number in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/generate-random-number-in-perl' rel='bookmark' title='Permanent Link: Generate random number in Perl'>Generate random number in Perl</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Generate dummy file in Linux</p>
<p><strong>Answer:</strong></p>
<p>To generate random files of fixed size (e.g. <strong>1GB</strong>) in Linux:</p>
<p><code>dd if=/dev/zero of=test.bin bs=1000000000 count=1</code> </p>
<p>You can adjust the file size by setting the <strong>bs </strong>parameter (byte size).</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-create-a-dummy-file-with-a-given-size-in-linux' rel='bookmark' title='Permanent Link: How to create a dummy file with a given size in Linux?'>How to create a dummy file with a given size in Linux?</a></li>
<li><a href='http://www.linuxask.com/questions/generate-random-number-in-linux' rel='bookmark' title='Permanent Link: Generate random number in Linux'>Generate random number in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/generate-random-number-in-perl' rel='bookmark' title='Permanent Link: Generate random number in Perl'>Generate random number in Perl</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/FBoVI7dqU7E" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/generate-dummy-file-in-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/generate-dummy-file-in-linux</feedburner:origLink></item>
		<item>
		<title>Disable reply to ping</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/vPklrtM4KL4/disable-reply-to-ping</link>
		<comments>http://www.linuxask.com/questions/disable-reply-to-ping#comments</comments>
		<pubDate>Thu, 04 Mar 2010 14:01:04 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>
		<category><![CDATA[networking]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1445</guid>
		<description><![CDATA[Disable reply to ping
Answer:
To stop other machine from pinging your machine, you the following command
# sysctl -w net.ipv4.icmp_echo_ignore_all=1
To turn it on again:
# sysctl -w net.ipv4.icmp_echo_ignore_all=0


Related posts:Network connectivity testing using ping command
Disable AppArmor in Ubuntu
How to ping a web site periodically



Related posts:<ol><li><a href='http://www.linuxask.com/questions/network-connectivity-testing-using-ping-command' rel='bookmark' title='Permanent Link: Network connectivity testing using ping command'>Network connectivity testing using ping command</a></li>
<li><a href='http://www.linuxask.com/questions/disable-apparmor-in-ubuntu' rel='bookmark' title='Permanent Link: Disable AppArmor in Ubuntu'>Disable AppArmor in Ubuntu</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-ping-a-web-site-periodically' rel='bookmark' title='Permanent Link: How to ping a web site periodically'>How to ping a web site periodically</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Disable reply to ping</p>
<p><strong>Answer:</strong></p>
<p>To stop other machine from <strong>pinging </strong>your machine, you the following command</p>
<p><code># sysctl -w net.ipv4.icmp_echo_ignore_all=1</code></p>
<p>To turn it on again:</p>
<p><code># sysctl -w net.ipv4.icmp_echo_ignore_all=0</code></p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/network-connectivity-testing-using-ping-command' rel='bookmark' title='Permanent Link: Network connectivity testing using ping command'>Network connectivity testing using ping command</a></li>
<li><a href='http://www.linuxask.com/questions/disable-apparmor-in-ubuntu' rel='bookmark' title='Permanent Link: Disable AppArmor in Ubuntu'>Disable AppArmor in Ubuntu</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-ping-a-web-site-periodically' rel='bookmark' title='Permanent Link: How to ping a web site periodically'>How to ping a web site periodically</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/vPklrtM4KL4" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/disable-reply-to-ping/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/disable-reply-to-ping</feedburner:origLink></item>
		<item>
		<title>How to check if a file is locked in Linux?</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/yH5NlXZ5SZ0/how-to-check-if-a-file-is-locked-in-linux</link>
		<comments>http://www.linuxask.com/questions/how-to-check-if-a-file-is-locked-in-linux#comments</comments>
		<pubDate>Tue, 02 Mar 2010 13:30:49 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Applications]]></category>
		<category><![CDATA[filesystem]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1441</guid>
		<description><![CDATA[How to check if a file is locked in Linux?
Answer:
Suppose a file test.txt is being locked by a program, e.g. using the flock system call, how can we know if this file is really being locked?
# lsof test.txt
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
perl   [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/generate-dummy-file-in-linux' rel='bookmark' title='Permanent Link: Generate dummy file in Linux'>Generate dummy file in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/create-an-empty-file-in-linux' rel='bookmark' title='Permanent Link: Create an empty file in Linux'>Create an empty file in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-check-linux-io-scheduler' rel='bookmark' title='Permanent Link: How to check Linux I/O scheduler'>How to check Linux I/O scheduler</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to check if a file is locked in Linux?</p>
<p><strong>Answer:</strong></p>
<p>Suppose a file <strong>test.txt</strong> is being locked by a program, e.g. using the <a href="http://linux.die.net/man/2/flock">flock</a> system call, how can we know if this file is really being locked?</p>
<pre><code># lsof test.txt
COMMAND  PID USER   FD   TYPE DEVICE SIZE   NODE NAME
perl    5654 john 3uW  REG    8,1    1 983057 test.txt
</code></pre>
<p>The <strong>W</strong> means the file is currently held by an exclusive lock. You can find more information in the link below:</p>
<p><a href="http://linux.die.net/man/2/flock">http://linux.die.net/man/2/flock<br />
</a></p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/generate-dummy-file-in-linux' rel='bookmark' title='Permanent Link: Generate dummy file in Linux'>Generate dummy file in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/create-an-empty-file-in-linux' rel='bookmark' title='Permanent Link: Create an empty file in Linux'>Create an empty file in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-check-linux-io-scheduler' rel='bookmark' title='Permanent Link: How to check Linux I/O scheduler'>How to check Linux I/O scheduler</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/yH5NlXZ5SZ0" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-check-if-a-file-is-locked-in-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/how-to-check-if-a-file-is-locked-in-linux</feedburner:origLink></item>
		<item>
		<title>How to perform syntax check for Python program</title>
		<link>http://feedproxy.google.com/~r/linuxask/~3/2SJoH7E6CMc/how-to-perform-syntax-check-for-python-program</link>
		<comments>http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program#comments</comments>
		<pubDate>Mon, 01 Mar 2010 13:26:16 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=1437</guid>
		<description><![CDATA[How to perform syntax check for Python program
Answer:
Assume you have a simple Python script hello.py, you want to perform syntax check. You can use the following method
# python -c 'import hello'

Traceback (most recent call last):
  File "", line 1, in 
  File "hello.py", line 1
    echo "Hello, World!"

If there is [...]


Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-perform-syntax-check-for-perl-program' rel='bookmark' title='Permanent Link: How to perform syntax check for Perl program'>How to perform syntax check for Perl program</a></li>
<li><a href='http://www.linuxask.com/questions/perform-syntax-check-to-php-files' rel='bookmark' title='Permanent Link: Perform syntax check to PHP files'>Perform syntax check to PHP files</a></li>
<li><a href='http://www.linuxask.com/questions/installing-python-modules-with-easy_install' rel='bookmark' title='Permanent Link: Installing Python modules with easy_install'>Installing Python modules with easy_install</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to perform syntax check for Python program</p>
<p><strong>Answer:</strong></p>
<p>Assume you have a simple Python script<strong> hello.py</strong>, you want to perform syntax check. You can use the following method</p>
<pre><code># python -c 'import hello'

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "hello.py", line 1
    echo "Hello, World!"
</code></pre>
<p>If there is any syntax error, it will prompt out to the screen.</p>


<p>Related posts:<ol><li><a href='http://www.linuxask.com/questions/how-to-perform-syntax-check-for-perl-program' rel='bookmark' title='Permanent Link: How to perform syntax check for Perl program'>How to perform syntax check for Perl program</a></li>
<li><a href='http://www.linuxask.com/questions/perform-syntax-check-to-php-files' rel='bookmark' title='Permanent Link: Perform syntax check to PHP files'>Perform syntax check to PHP files</a></li>
<li><a href='http://www.linuxask.com/questions/installing-python-modules-with-easy_install' rel='bookmark' title='Permanent Link: Installing Python modules with easy_install'>Installing Python modules with easy_install</a></li>
</ol></p><img src="http://feeds.feedburner.com/~r/linuxask/~4/2SJoH7E6CMc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		<feedburner:origLink>http://www.linuxask.com/questions/how-to-perform-syntax-check-for-python-program</feedburner:origLink></item>
	</channel>
</rss>
