<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Linux Ask! &#187; Commands</title>
	<atom:link href="http://www.linuxask.com/topics/basic-linux/commands/feed" rel="self" type="application/rss+xml" />
	<link>http://www.linuxask.com</link>
	<description>Linux Ask! is a Q &#38; A web site specific for Linux related questions such as how to use common Linux commands.</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:57:59 +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" />
		<item>
		<title>Move cursor to the end of file in VIM</title>
		<link>http://www.linuxask.com/questions/move-cursor-to-the-end-of-file-in-vim</link>
		<comments>http://www.linuxask.com/questions/move-cursor-to-the-end-of-file-in-vim#comments</comments>
		<pubDate>Mon, 23 Jan 2012 15:23:11 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[vim]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3647</guid>
		<description><![CDATA[Move cursor to the end of file in VIM Answer: To move to the end of a file in VIM, type G Related posts: Quickly open to file and position a cursor with vim Move a directory in a subversion repository Move a long running job to background
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/quickly-open-to-file-and-position-a-cursor-with-vim' rel='bookmark' title='Quickly open to file and position a cursor with vim'>Quickly open to file and position a cursor with vim</a></li>
<li><a href='http://www.linuxask.com/questions/move-a-directory-in-a-subversion-repository' rel='bookmark' title='Move a directory in a subversion repository'>Move a directory in a subversion repository</a></li>
<li><a href='http://www.linuxask.com/questions/move-a-long-running-job-to-background' rel='bookmark' title='Move a long running job to background'>Move a long running job to background</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Move cursor to the end of file in VIM</p>
<p><strong>Answer:</strong></p>
<p>To move to the end of a file in VIM, type </p>
<p><code>G</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/quickly-open-to-file-and-position-a-cursor-with-vim' rel='bookmark' title='Quickly open to file and position a cursor with vim'>Quickly open to file and position a cursor with vim</a></li>
<li><a href='http://www.linuxask.com/questions/move-a-directory-in-a-subversion-repository' rel='bookmark' title='Move a directory in a subversion repository'>Move a directory in a subversion repository</a></li>
<li><a href='http://www.linuxask.com/questions/move-a-long-running-job-to-background' rel='bookmark' title='Move a long running job to background'>Move a long running job to background</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/move-cursor-to-the-end-of-file-in-vim/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Removed opened port in ufw</title>
		<link>http://www.linuxask.com/questions/removed-opened-port-in-ufw</link>
		<comments>http://www.linuxask.com/questions/removed-opened-port-in-ufw#comments</comments>
		<pubDate>Fri, 20 Jan 2012 09:47:08 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Advanced Linux]]></category>
		<category><![CDATA[Commands]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[ufw]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3631</guid>
		<description><![CDATA[Removed opened port in ufw Answer: If you have opened a port using the ufw command in Ubuntu, but now you want to delete it, you can.. # sudo ufw delete allow 8080/tcp And then do a reload # # sudo ufw reload That's all. Related posts: Open a TCP port in Ubuntu&#8217;s ufw firewall <a href='http://www.linuxask.com/questions/removed-opened-port-in-ufw'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/open-a-tcp-port-in-ubuntus-ufw-firewall' rel='bookmark' title='Open a TCP port in Ubuntu&#8217;s ufw firewall'>Open a TCP port in Ubuntu&#8217;s ufw firewall</a></li>
<li><a href='http://www.linuxask.com/questions/simple-port-forwarding-using-ssh' rel='bookmark' title='Simple port forwarding using SSH'>Simple port forwarding using SSH</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-smtp-submission-port-587' rel='bookmark' title='What is the SMTP submission port 587?'>What is the SMTP submission port 587?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Removed opened port in ufw</p>
<p><strong>Answer:</strong></p>
<p>If you have opened a port using the ufw command in Ubuntu, but now you want to delete it, you can..</p>
<p><code> # sudo ufw delete allow 8080/tcp </code></p>
<p>And then do a reload</p>
<p><code># # sudo ufw reload</code></p>
<p>That's all.</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/open-a-tcp-port-in-ubuntus-ufw-firewall' rel='bookmark' title='Open a TCP port in Ubuntu&#8217;s ufw firewall'>Open a TCP port in Ubuntu&#8217;s ufw firewall</a></li>
<li><a href='http://www.linuxask.com/questions/simple-port-forwarding-using-ssh' rel='bookmark' title='Simple port forwarding using SSH'>Simple port forwarding using SSH</a></li>
<li><a href='http://www.linuxask.com/questions/what-is-the-smtp-submission-port-587' rel='bookmark' title='What is the SMTP submission port 587?'>What is the SMTP submission port 587?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/removed-opened-port-in-ufw/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to perform a reverse DNS lookup in Linux</title>
		<link>http://www.linuxask.com/questions/how-to-perform-a-reverse-dns-lookup-in-linux</link>
		<comments>http://www.linuxask.com/questions/how-to-perform-a-reverse-dns-lookup-in-linux#comments</comments>
		<pubDate>Tue, 17 Jan 2012 15:48:42 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Ubuntu]]></category>
		<category><![CDATA[dns]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3617</guid>
		<description><![CDATA[How to perform a reverse DNS lookup in Linux Answer: To perform a reverse DNS lookup for a domain in Linux, you can use the dig command, e.g. # dig -x 8.8.8.8 ; DiG 9.7.0-P1 -x 8.8.8.8 ;; global options: +cmd ;; Got answer: ;; ->>HEADER
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-reverse-print-a-file' rel='bookmark' title='How to reverse print a file?'>How to reverse print a file?</a></li>
<li><a href='http://www.linuxask.com/questions/reverse-characters-on-each-line' rel='bookmark' title='Reverse characters on each line'>Reverse characters on each line</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-simple-calculations-in-linux-shell' rel='bookmark' title='How to perform simple calculations in Linux shell?'>How to perform simple calculations in Linux shell?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>How to perform a reverse DNS lookup in Linux</p>
<p><strong>Answer:</strong></p>
<p>To perform a  reverse DNS lookup for a domain in Linux, you can use the <strong>dig </strong>command, e.g.</p>
<pre><code># dig -x 8.8.8.8

; <<>> DiG 9.7.0-P1 <<>> -x 8.8.8.8
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 59808
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;8.8.8.8.in-addr.arpa.          IN      PTR

;; ANSWER SECTION:
8.8.8.8.in-addr.arpa.   86328   IN      PTR     google-public-dns-a.google.com.

..
</code></pre>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-reverse-print-a-file' rel='bookmark' title='How to reverse print a file?'>How to reverse print a file?</a></li>
<li><a href='http://www.linuxask.com/questions/reverse-characters-on-each-line' rel='bookmark' title='Reverse characters on each line'>Reverse characters on each line</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-perform-simple-calculations-in-linux-shell' rel='bookmark' title='How to perform simple calculations in Linux shell?'>How to perform simple calculations in Linux shell?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/how-to-perform-a-reverse-dns-lookup-in-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exclude files when using the du to estimate disk usage</title>
		<link>http://www.linuxask.com/questions/exclude-files-when-using-the-du-to-estimate-disk-usage</link>
		<comments>http://www.linuxask.com/questions/exclude-files-when-using-the-du-to-estimate-disk-usage#comments</comments>
		<pubDate>Wed, 05 Oct 2011 06:49:44 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3543</guid>
		<description><![CDATA[Exclude files when using the du to estimate disk usage Answer: It is easy to use du command to estimate disk usage, however, sometimes you want to ignore some files during the calculation. To do so, try # du -h --exclude='*.bak' The above command will exclude all the file end with the extension .bak during <a href='http://www.linuxask.com/questions/exclude-files-when-using-the-du-to-estimate-disk-usage'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-check-which-directory-used-up-most-of-the-disk-space' rel='bookmark' title='How to check which directory used up most of the disk space?'>How to check which directory used up most of the disk space?</a></li>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-ignore-dummy-files-e-g-from-cvs-svn-during-rsync' rel='bookmark' title='How to ignore dummy files (e.g. from CVS, SVN) during rsync?'>How to ignore dummy files (e.g. from CVS, SVN) during rsync?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Exclude files when using the du to estimate disk usage </p>
<p><strong>Answer:</strong></p>
<p>It is easy to use <a href="http://www.linuxask.com/questions/list-the-size-of-sub-directories-in-the-current-directory">du </a>command to estimate disk usage, however, sometimes you want to ignore some files during the calculation.</p>
<p>To do so, try</p>
<p><code># du -h --exclude='*.bak'</code></p>
<p>The above command will exclude all the file end with the extension <strong>.bak</strong> during the disk space calculation.</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-check-which-directory-used-up-most-of-the-disk-space' rel='bookmark' title='How to check which directory used up most of the disk space?'>How to check which directory used up most of the disk space?</a></li>
<li><a href='http://www.linuxask.com/questions/mysql-binary-log-files-take-all-of-my-disk-space' rel='bookmark' title='MySQL binary log files take all of my disk space'>MySQL binary log files take all of my disk space</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-ignore-dummy-files-e-g-from-cvs-svn-during-rsync' rel='bookmark' title='How to ignore dummy files (e.g. from CVS, SVN) during rsync?'>How to ignore dummy files (e.g. from CVS, SVN) during rsync?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/exclude-files-when-using-the-du-to-estimate-disk-usage/feed</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Post a file to a server using the Curl command</title>
		<link>http://www.linuxask.com/questions/post-a-file-to-a-server-using-the-curl-command</link>
		<comments>http://www.linuxask.com/questions/post-a-file-to-a-server-using-the-curl-command#comments</comments>
		<pubDate>Sun, 04 Sep 2011 10:42:49 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Advanced Linux]]></category>
		<category><![CDATA[Commands]]></category>
		<category><![CDATA[Internet]]></category>
		<category><![CDATA[curl]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3439</guid>
		<description><![CDATA[Post a file to a server using the Curl command Answer: You can simulate a HTTP form post, with a file being uploaded to a remote server using the curl command. curl -F 'photo=@/upload/image.jpg' http://example.com/upload.php Assume the name of the form element of your upload is called "photo" Related posts: Show HTTP response using curl <a href='http://www.linuxask.com/questions/post-a-file-to-a-server-using-the-curl-command'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/show-http-response-using-curl-command' rel='bookmark' title='Show HTTP response using curl command'>Show HTTP response using curl command</a></li>
<li><a href='http://www.linuxask.com/questions/show-http-response-header-using-curl' rel='bookmark' title='Show HTTP response header using curl'>Show HTTP response header using curl</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-simulate-curl-using-wget-command' rel='bookmark' title='How to simulate curl using wget command?'>How to simulate curl using wget command?</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Post a file to a server using the Curl command</p>
<p><strong>Answer:</strong></p>
<p>You can simulate a HTTP form post, with a file being uploaded to a remote server using the <strong>curl </strong>command.</p>
<pre><code>curl -F 'photo=@/upload/image.jpg' http://example.com/upload.php</code></pre>
<p>Assume the name of the form element of your upload is called "<strong>photo</strong>"</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/show-http-response-using-curl-command' rel='bookmark' title='Show HTTP response using curl command'>Show HTTP response using curl command</a></li>
<li><a href='http://www.linuxask.com/questions/show-http-response-header-using-curl' rel='bookmark' title='Show HTTP response header using curl'>Show HTTP response header using curl</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-simulate-curl-using-wget-command' rel='bookmark' title='How to simulate curl using wget command?'>How to simulate curl using wget command?</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/post-a-file-to-a-server-using-the-curl-command/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Create a transparent image using ImageMagick</title>
		<link>http://www.linuxask.com/questions/create-a-transparent-image-using-imagemagick</link>
		<comments>http://www.linuxask.com/questions/create-a-transparent-image-using-imagemagick#comments</comments>
		<pubDate>Mon, 29 Aug 2011 13:29:05 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Graphics]]></category>
		<category><![CDATA[ImageMagick]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3445</guid>
		<description><![CDATA[Create a transparent image using ImageMagick Answer: You can use the following command to create an empty png file, using the ImageMagick. # convert -size 100x100 xc:none empty.png an empty png of size 100x100 will be created. Related posts: Combine multiple images into a single image with ImageMagick Convert HTML to image Create ISO image <a href='http://www.linuxask.com/questions/create-a-transparent-image-using-imagemagick'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/combine-multiple-images-into-a-single-image-with-imagemagick' rel='bookmark' title='Combine multiple images into a single image with ImageMagick'>Combine multiple images into a single image with ImageMagick</a></li>
<li><a href='http://www.linuxask.com/questions/convert-html-to-image' rel='bookmark' title='Convert HTML to image'>Convert HTML to image</a></li>
<li><a href='http://www.linuxask.com/questions/create-iso-image-from-cd-rom-in-linux' rel='bookmark' title='Create ISO image from CD-ROM in Linux'>Create ISO image from CD-ROM in Linux</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Create a transparent image using ImageMagick</p>
<p><strong>Answer:</strong></p>
<p>You can use the following command to create an empty <strong>png</strong> file, using the <strong>ImageMagick</strong>.</p>
<p><code># convert -size 100x100 xc:none empty.png</code></p>
<p>an empty png of size 100x100 will be created.</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/combine-multiple-images-into-a-single-image-with-imagemagick' rel='bookmark' title='Combine multiple images into a single image with ImageMagick'>Combine multiple images into a single image with ImageMagick</a></li>
<li><a href='http://www.linuxask.com/questions/convert-html-to-image' rel='bookmark' title='Convert HTML to image'>Convert HTML to image</a></li>
<li><a href='http://www.linuxask.com/questions/create-iso-image-from-cd-rom-in-linux' rel='bookmark' title='Create ISO image from CD-ROM in Linux'>Create ISO image from CD-ROM in Linux</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/create-a-transparent-image-using-imagemagick/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Edit a remote file with vim over SSH</title>
		<link>http://www.linuxask.com/questions/edit-a-remote-file-with-vim-over-ssh</link>
		<comments>http://www.linuxask.com/questions/edit-a-remote-file-with-vim-over-ssh#comments</comments>
		<pubDate>Sat, 27 Aug 2011 13:56:34 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Advanced Linux]]></category>
		<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3412</guid>
		<description><![CDATA[Edit a remote file with vim over SSH Answer: If you have a remote file and you can have a quick edit, if you use the following command: # ssh -t john@remote-server vim /data/test.txt You will be prompted to login if you don't have proper ssh key in the remote server, and after finishing editing <a href='http://www.linuxask.com/questions/edit-a-remote-file-with-vim-over-ssh'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/copy-file-to-remote-server-using-scp' rel='bookmark' title='Copy file to remote server using scp'>Copy file to remote server using scp</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-transfer-your-identity-pub-to-the-remote-machine%e2%80%99s-authorized_keys' rel='bookmark' title='How to transfer your identity.pub to the remote machine’s authorized_keys?'>How to transfer your identity.pub to the remote machine’s authorized_keys?</a></li>
<li><a href='http://www.linuxask.com/questions/block-a-remote-ip-address-using-iptables' rel='bookmark' title='Block a remote IP Address using iptables'>Block a remote IP Address using iptables</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Edit a remote file with vim over SSH</p>
<p><strong>Answer:</strong></p>
<p>If you have a remote file and you can have a quick edit, if you use the following command:</p>
<p><code># ssh  -t john@remote-server vim /data/test.txt</code></p>
<p>You will be prompted to login if you don't <a href="http://www.linuxask.com/questions/how-to-transfer-your-identity-pub-to-the-remote-machine%E2%80%99s-authorized_keys">have proper ssh key</a> in the remote server, and after finishing editing the file, you will quit the ssh session automatically.</p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/copy-file-to-remote-server-using-scp' rel='bookmark' title='Copy file to remote server using scp'>Copy file to remote server using scp</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-transfer-your-identity-pub-to-the-remote-machine%e2%80%99s-authorized_keys' rel='bookmark' title='How to transfer your identity.pub to the remote machine’s authorized_keys?'>How to transfer your identity.pub to the remote machine’s authorized_keys?</a></li>
<li><a href='http://www.linuxask.com/questions/block-a-remote-ip-address-using-iptables' rel='bookmark' title='Block a remote IP Address using iptables'>Block a remote IP Address using iptables</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/edit-a-remote-file-with-vim-over-ssh/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Sort numerical value using the sort command</title>
		<link>http://www.linuxask.com/questions/sort-numerical-value-using-the-sort-command</link>
		<comments>http://www.linuxask.com/questions/sort-numerical-value-using-the-sort-command#comments</comments>
		<pubDate>Sun, 03 Jul 2011 10:00:42 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[sort]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3159</guid>
		<description><![CDATA[Sort numerical value using the sort command Answer: Assume you have a text file contains the following content: 1 2 3 10 When you use the sort command to sort them, it will give the following output: # sort test.txt 1 10 2 3 So you need to sort them according to the numerical values? <a href='http://www.linuxask.com/questions/sort-numerical-value-using-the-sort-command'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-sort-ip-addresses-in-linux' rel='bookmark' title='How to sort IP addresses in Linux'>How to sort IP addresses in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-save-the-output-of-ls-command' rel='bookmark' title='How to save the output of ls command?'>How to save the output of ls command?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-sort-a-file-by-n-column' rel='bookmark' title='How to sort a file by n-column'>How to sort a file by n-column</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Sort numerical value using the sort command</p>
<p><strong>Answer:</strong></p>
<p>Assume you have a text file contains the following content:</p>
<pre><code>1
2
3
10</code></pre>
<p>When you use the <strong>sort </strong>command to sort them, it will give the following output:</p>
<pre><code># sort test.txt
1
10
2
3</code></pre>
<p>So you need to sort them according to the numerical values?</p>
<p>Try with the <strong>n </strong>flag:</p>
<pre><code># sort -n test.txt
1
2
3
10</code></pre>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/how-to-sort-ip-addresses-in-linux' rel='bookmark' title='How to sort IP addresses in Linux'>How to sort IP addresses in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-save-the-output-of-ls-command' rel='bookmark' title='How to save the output of ls command?'>How to save the output of ls command?</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-sort-a-file-by-n-column' rel='bookmark' title='How to sort a file by n-column'>How to sort a file by n-column</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/sort-numerical-value-using-the-sort-command/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Revert uncommitted change in Git</title>
		<link>http://www.linuxask.com/questions/revert-uncommitted-change-in-git</link>
		<comments>http://www.linuxask.com/questions/revert-uncommitted-change-in-git#comments</comments>
		<pubDate>Fri, 17 Jun 2011 11:51:02 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[Git]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[git]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3108</guid>
		<description><![CDATA[Revert uncommitted change in Git Answer: To revert the changes of a uncommitted file in Git, you need to use the following command: # git checkout file Related posts: Do not save backup copies of files when doing revert in Mercurial Revert all local changes in SVN Revert the effect of an earlier changeset in <a href='http://www.linuxask.com/questions/revert-uncommitted-change-in-git'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/do-not-save-backup-copies-of-files-when-doing-revert-in-mercurial' rel='bookmark' title='Do not save backup copies of files when doing revert in Mercurial'>Do not save backup copies of files when doing revert in Mercurial</a></li>
<li><a href='http://www.linuxask.com/questions/revert-all-local-changes-in-svn' rel='bookmark' title='Revert all local changes in SVN'>Revert all local changes in SVN</a></li>
<li><a href='http://www.linuxask.com/questions/revert-the-effect-of-an-earlier-changeset-in-mercurial' rel='bookmark' title='Revert the effect of an earlier changeset in Mercurial'>Revert the effect of an earlier changeset in Mercurial</a></li>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Revert uncommitted change in Git</p>
<p><strong>Answer:</strong></p>
<p>To <strong>revert </strong>the changes of a uncommitted file in <strong>Git</strong>, you need to use the following command:</p>
<p><code># git checkout file </code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/do-not-save-backup-copies-of-files-when-doing-revert-in-mercurial' rel='bookmark' title='Do not save backup copies of files when doing revert in Mercurial'>Do not save backup copies of files when doing revert in Mercurial</a></li>
<li><a href='http://www.linuxask.com/questions/revert-all-local-changes-in-svn' rel='bookmark' title='Revert all local changes in SVN'>Revert all local changes in SVN</a></li>
<li><a href='http://www.linuxask.com/questions/revert-the-effect-of-an-earlier-changeset-in-mercurial' rel='bookmark' title='Revert the effect of an earlier changeset in Mercurial'>Revert the effect of an earlier changeset in Mercurial</a></li>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/revert-uncommitted-change-in-git/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Auto create complete directory structure when copying files in Linux</title>
		<link>http://www.linuxask.com/questions/auto-create-complete-directory-structure-when-copying-files-in-linux</link>
		<comments>http://www.linuxask.com/questions/auto-create-complete-directory-structure-when-copying-files-in-linux#comments</comments>
		<pubDate>Wed, 15 Jun 2011 08:05:08 +0000</pubDate>
		<dc:creator>Linux Ask!</dc:creator>
				<category><![CDATA[Commands]]></category>
		<category><![CDATA[command]]></category>

		<guid isPermaLink="false">http://www.linuxask.com/?p=3089</guid>
		<description><![CDATA[Auto create complete directory structure when copying files in Linux Answer: Assume you are copying file using the command below: # cp foo/bar/test.txt /tmp/ The result is test.txt will be placed inside the folder /tmp/. In order to let the cp command auto create the foo/bar/ directory structure under /tmp, you can try the command: <a href='http://www.linuxask.com/questions/auto-create-complete-directory-structure-when-copying-files-in-linux'>[...]</a>
Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/create-a-directory-tree-in-linux' rel='bookmark' title='Create a directory tree in Linux'>Create a directory tree in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/download-a-complete-directory-on-ftp-server-with-wget' rel='bookmark' title='Download a complete directory on FTP server with wget'>Download a complete directory on FTP server with wget</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-dummy-file-with-a-given-size-in-linux' rel='bookmark' title='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>
</ol>]]></description>
			<content:encoded><![CDATA[<p>Auto create complete directory structure when copying files in Linux</p>
<p><strong>Answer:</strong></p>
<p>Assume you are copying file using the command below:</p>
<p><code># cp foo/bar/test.txt /tmp/</code></p>
<p>The result is <strong>test.txt</strong> will be placed inside the folder <strong>/tmp/</strong>.</p>
<p>In order to let the <strong>cp </strong>command auto create the <strong>foo/bar/</strong> directory structure under /tmp, you can try the command:</p>
<p><code># cp --parent foo/bar/test.txt /tmp/</code></p>
<p>Related posts:<ol>
<li><a href='http://www.linuxask.com/questions/create-a-directory-tree-in-linux' rel='bookmark' title='Create a directory tree in Linux'>Create a directory tree in Linux</a></li>
<li><a href='http://www.linuxask.com/questions/download-a-complete-directory-on-ftp-server-with-wget' rel='bookmark' title='Download a complete directory on FTP server with wget'>Download a complete directory on FTP server with wget</a></li>
<li><a href='http://www.linuxask.com/questions/how-to-create-a-dummy-file-with-a-given-size-in-linux' rel='bookmark' title='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>
</ol></p>]]></content:encoded>
			<wfw:commentRss>http://www.linuxask.com/questions/auto-create-complete-directory-structure-when-copying-files-in-linux/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

