<?xml version="1.0" encoding="UTF-8"?> <rss
version="2.0"
xmlns:content="http://purl.org/rss/1.0/modules/content/"
xmlns:wfw="http://wellformedweb.org/CommentAPI/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:atom="http://www.w3.org/2005/Atom"
xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
xmlns:rawvoice="http://www.rawvoice.com/rawvoiceRssModule/"
> <channel><title>jappler.com &#187; UNIX</title> <atom:link href="http://jappler.com/blog/archive/category/technology-general/unix/feed" rel="self" type="application/rss+xml" /><link>http://jappler.com</link> <description>random and opinionated thoughts by Jennifer Zelazny</description> <lastBuildDate>Fri, 10 Feb 2012 15:25:47 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator><itunes:summary>random and opinionated thoughts by Jennifer Zelazny</itunes:summary> <itunes:author>jappler.com</itunes:author> <itunes:explicit>no</itunes:explicit> <itunes:image href="http://jappler.com/wp-content/plugins/powerpress/itunes_default.jpg" /> <itunes:subtitle>random and opinionated thoughts by Jennifer Zelazny</itunes:subtitle> <image><title>jappler.com &#187; UNIX</title> <url>http://jappler.com/wp-content/plugins/powerpress/rss_default.jpg</url><link>http://jappler.com/blog/archive/category/technology-general/unix</link> </image> <item><title>Copy to Clipboard in the Command Line Interface (CLI)</title><link>http://jappler.com/blog/archive/2008/06/10/copy-to-clipboard-in-the-command-line-interface-cli</link> <comments>http://jappler.com/blog/archive/2008/06/10/copy-to-clipboard-in-the-command-line-interface-cli#comments</comments> <pubDate>Wed, 11 Jun 2008 02:49:41 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Apple]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[commands]]></category> <category><![CDATA[Mac OS]]></category> <category><![CDATA[pbcopy]]></category> <category><![CDATA[pbpaste]]></category> <guid
isPermaLink="false">http://www.jappler.com/?p=869</guid> <description><![CDATA[Ever wonder how to copy something from the command line into the Mac OS clipboard? If you want to copy/paste a files content (perhaps a log file or a conf file, etc) into the clipboard to use outside of the CLI, you can use the commands pbcopy and pbpaste. Example: I want to copy the contents of my public key to the clipboard (so I can send it to a server admin who will use... <a
href="http://jappler.com/blog/archive/2008/06/10/copy-to-clipboard-in-the-command-line-interface-cli">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>Ever wonder how to copy something from the command line into the Mac OS clipboard?  If you want to copy/paste a files content (perhaps a log file or a conf file, etc) into the clipboard to use outside of the CLI, you can use the commands <a
href="http://developer.apple.com/documentation/Darwin/Reference/ManPages/man1/pbcopy.1.html">pbcopy and pbpaste</a>.  Example: I want to copy the contents of my public key to the clipboard (so I can send it to a server admin who will use it in allowing me to access their subversion repository).</p><p>All I would need to do is:<br
/> <code>cat id_dsa.pub | pbcopy</code></p><p>(cat writes out the content and then it is piped (|) into the clipboard)  This comes in handy!</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2008/06/10/copy-to-clipboard-in-the-command-line-interface-cli/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Quick Site Backup (files and database) Via the Command Line</title><link>http://jappler.com/blog/archive/2008/02/25/quick-site-backup-files-and-database-via-the-command-line</link> <comments>http://jappler.com/blog/archive/2008/02/25/quick-site-backup-files-and-database-via-the-command-line#comments</comments> <pubDate>Mon, 25 Feb 2008 22:37:59 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[CLI]]></category> <category><![CDATA[export]]></category> <category><![CDATA[MySQL]]></category> <category><![CDATA[SSH]]></category> <category><![CDATA[tar]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2008/02/25/quick-site-backup-files-and-database-via-the-command-line</guid> <description><![CDATA[If you do any sort of web development, it is more than likely that CPANEL and phpMyAdmin are good friends of yours&#8230;and you depend on them. Even though those are extremely handy to create/modify databases and create backups, it is extremely helpful to know how to do the same thing by using only SSH and command line utilities. To backup (export) a database using the command line interface (CLI): You will then need to provide... <a
href="http://jappler.com/blog/archive/2008/02/25/quick-site-backup-files-and-database-via-the-command-line">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>If you do any sort of web development, it is more than likely that <a
href="www.cpanel.net/">CPANEL</a> and <a
href="http://www.phpmyadmin.net">phpMyAdmin</a> are good friends of yours&#8230;and you depend on them.  Even though those are extremely handy to create/modify databases and create backups, it is extremely helpful to know how to do the same thing by using only SSH and command line utilities.</p><p><strong>To backup  (export) a database using the command line interface (CLI):</strong></p><pre class="brush: plain; title: ; notranslate">
mysqldump -p --user=username --add-drop-table database &amp;gt; backup.sql
</pre><p>You will then need to provide your database password and the exported data will go into a file called &#8220;backup.sql&#8221; which is located in the directory that you are currently in.  (more <a
href="http://dev.mysql.com/doc/refman/5.0/en/mysqldump.html">mysqldump documentation</a></p><p><strong>To backup your files:</strong></p><pre class="brush: plain; title: ; notranslate">
tar -cvzf backup.tgz directoryname
</pre><p>The command will create an archive of all your files so you can easily move or store one file (the archive).  More <a
href="http://unixhelp.ed.ac.uk/CGI/man-cgi?tar">tar documentation</a>.</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2008/02/25/quick-site-backup-files-and-database-via-the-command-line/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Mac OS X 10.5 (Leopard) SMB Fix</title><link>http://jappler.com/blog/archive/2007/11/16/mac-os-x-105-leopard-smb-fix</link> <comments>http://jappler.com/blog/archive/2007/11/16/mac-os-x-105-leopard-smb-fix#comments</comments> <pubDate>Fri, 16 Nov 2007 20:00:25 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Apple]]></category> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[fixes]]></category> <category><![CDATA[Mac-OS-X]]></category> <category><![CDATA[Mac-OS-X-10.5]]></category> <category><![CDATA[SMB]]></category> <category><![CDATA[troubleshooting]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2007/11/16/mac-os-x-105-leopard-smb-fix</guid> <description><![CDATA[I ran into an issue earlier today where I could not connect to a SMB share after my upgrade to Mac OS X 10.5. After some research, I found a thread in Apple&#8217;s Discussions. Basically&#8230;you need to not use &#8220;Connect to Server&#8230;&#8221; &#8211; you need to mount/unmount the SMB share via the command line. Basic Mount/Unmount Process Create a directory (folder) where you want the mounted share to appear. I created a folder called &#8220;SMB&#8221;... <a
href="http://jappler.com/blog/archive/2007/11/16/mac-os-x-105-leopard-smb-fix">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>I ran into an issue earlier today where I could not connect to a SMB share after my upgrade to Mac OS X 10.5.  After some research, <a
href="http://discussions.apple.com/thread.jspa?threadID=1211756&amp;tstart=45">I found a thread in Apple&#8217;s Discussions</a>.</p><p>Basically&#8230;you need to not use &#8220;Connect to Server&#8230;&#8221; &#8211; you need to mount/unmount the SMB share via the command line.</p><p><strong>Basic Mount/Unmount Process</strong></p><ol><li>Create a directory (folder) where you want the mounted share to appear.  I created a folder called &#8220;SMB&#8221; on my Desktop</li><li>Type in the following command: mount_smbfs //useyourusername@localhost/remote_share /Users/useyourusername/Desktop/SMB in the terminal</li><li>You will be prompted for your password, type it in</li><li>You now have access to the files on the remote server in the folder you created &#8211; enjoy!</li><li>Once you are done, unmount the server by typing in the command: umount /Users/useyourusername/Desktop/SMB</li></ol><p>Hopefully Apple will fix this issue ASAP, but until they do, you now have a way to connect to servers via SMB.</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2007/11/16/mac-os-x-105-leopard-smb-fix/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Nano Tip</title><link>http://jappler.com/blog/archive/2007/08/15/nano-tip</link> <comments>http://jappler.com/blog/archive/2007/08/15/nano-tip#comments</comments> <pubDate>Wed, 15 Aug 2007 23:21:48 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[nano]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2007/08/15/nano-tip</guid> <description><![CDATA[I have been doing a lot of work recently on a remote server and have needed to use a text editor &#8211; so I decided to use the ever-so-easy nano. Problem is &#8211; the files I am working on are very long and editing them is not fun. I finally decided to look through the man pages (I am an emacs person myself) and found something that ended up saving me tons of time&#8230;&#8221;go to... <a
href="http://jappler.com/blog/archive/2007/08/15/nano-tip">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>I have been doing a lot of work recently on a remote server and have needed to use a text editor &#8211; so I decided to use the ever-so-easy nano.  Problem is &#8211; the files I am working on are very long and editing them is not fun.  I finally decided to look through the man pages (I am an emacs person myself) and found something that ended up saving me tons of time&#8230;&#8221;go to line number&#8221;.  If you are editing a file and know you need to edit something on line 1245, you would type in:</p><pre class="brush: plain; title: ; notranslate">nano +1245 master.css</pre><p> and it would open the file to line 1245 so you do not need to scroll down.  Thank you man pages!</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2007/08/15/nano-tip/feed</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>whereis and locate.</title><link>http://jappler.com/blog/archive/2007/01/29/whereis-and-locate</link> <comments>http://jappler.com/blog/archive/2007/01/29/whereis-and-locate#comments</comments> <pubDate>Tue, 30 Jan 2007 02:08:34 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[commands]]></category> <category><![CDATA[locate]]></category> <category><![CDATA[whereis]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2007/01/29/whereis-and-locate</guid> <description><![CDATA[A few simple commands to help make your life working with UNIX a little easier: If you are looking for a certain programs, use:whereis. Example. You want to find out where ipfw is located. In the command line type whereis ipfw and whereis will spit out the location (/sbin/ipfw). If you need to find a program or a file and you know what it is called, use:locate. Example. I know I want to uninstall MySQL,... <a
href="http://jappler.com/blog/archive/2007/01/29/whereis-and-locate">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>A few simple commands to help make your life working with UNIX a little easier:</p><ul><li>If you are looking for a certain programs, use:<strong>whereis</strong>.  Example.  You want to find out where ipfw is located.  In the command line type <code>whereis ipfw</code> and whereis will spit out the location (/sbin/ipfw).</li><li>If you need to find a program or a file and you know what it is called, use:<strong>locate</strong>.  Example.  I know I want to uninstall MySQL, and I want to  see every file that has mysql in the file path. In the command line, type <code>locate MySQL</code> and locate will spit out every file with MySQL in the file path.  (Note, locate is case sensitive).</li></ul> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2007/01/29/whereis-and-locate/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>print file size command.</title><link>http://jappler.com/blog/archive/2007/01/03/print-file-size-command</link> <comments>http://jappler.com/blog/archive/2007/01/03/print-file-size-command#comments</comments> <pubDate>Wed, 03 Jan 2007 22:30:04 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2007/01/03/print-file-size-command.php</guid> <description><![CDATA[Earlier today I was asked for the command to show a file size in UNIX and so I thought I would share. There are, of course, a few ways to do this. One great little command to keep handy is:du -h. The du (display utility) will print out the size of a file or directory. The -h will make it &#8220;human readable&#8221; (put the sizes in Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte). So, next... <a
href="http://jappler.com/blog/archive/2007/01/03/print-file-size-command">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>Earlier today I was asked for the command to show a file size in UNIX and so I thought I would share.  There are, of course, a few ways to do this.  One great little command to keep handy is:<code>du -h</code>.  The <b>du</b> (display utility) will print out the size of a file or directory.  The <b>-h</b> will make it &#8220;human readable&#8221; (put the sizes in Byte, Kilobyte, Megabyte, Gigabyte, Terabyte and Petabyte).  So, next time you need file or directory sizes, use <code>du -h</code> and be done with it!</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2007/01/03/print-file-size-command/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>command line to the rescue&#8230;again.</title><link>http://jappler.com/blog/archive/2006/06/27/stuffit-expander-not-cutting-ituse-the-command-line</link> <comments>http://jappler.com/blog/archive/2006/06/27/stuffit-expander-not-cutting-ituse-the-command-line#comments</comments> <pubDate>Wed, 28 Jun 2006 01:49:15 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Content Management Systems]]></category> <category><![CDATA[General]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[gunzip]]></category> <category><![CDATA[tar]]></category> <category><![CDATA[XOOPS]]></category> <guid
isPermaLink="false">http://www.jappler.com/blog/archive/2006/06/27/stuffit-expander-not-cutting-ituse-the-command-line.php</guid> <description><![CDATA[While upgrading a client&#8217;s web site to XOOPS 2.0.14 I ran into some issues with the XOOPS 2.0.14 package file (a tar.gz file). Stuffit Expander would only extract a few folders, then report an error and quit. After a few attempts, and all failures, I had to chose to turn to the command line and bingo, no problems! So, if you ever have any issues with Stuffit Expander and need to uncompress a .tar.gz file,... <a
href="http://jappler.com/blog/archive/2006/06/27/stuffit-expander-not-cutting-ituse-the-command-line">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>While upgrading a client&#8217;s web site to XOOPS 2.0.14 I ran into some issues with the XOOPS 2.0.14 package file (a tar.gz file).  Stuffit Expander would only extract a few folders, then report an error and quit.  After a few attempts, and all failures, I had to chose to turn to the command line and bingo, no problems! So, if you ever have any issues with Stuffit Expander and need to uncompress a .tar.gz file, the following commands will come in handy:</p><ul><li>To uncompress a gz file</b>: <code>gunzip file.gz </code></li><li>To uncompress a tar file:<br
/> <code>tar [tar options (usually xvf)] file.tar</code></li><li>To uncompress a .tar.gz file: <code>tar xzvf file.tar.gz</code></li></ul><p>Questions? Check out the man pages for <a
href="http://www.hmug.org/man/1/tar.php">tar</a> and <a
href="http://www.hmug.org/man/1/gunzip.php">gunzip</a>.<br
/> [tags]XOOPS, gunzip, tar[/tags]</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2006/06/27/stuffit-expander-not-cutting-ituse-the-command-line/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>ubuntu 5.10 for PPC.</title><link>http://jappler.com/blog/archive/2006/03/24/ubuntu-510-for-ppc</link> <comments>http://jappler.com/blog/archive/2006/03/24/ubuntu-510-for-ppc#comments</comments> <pubDate>Fri, 24 Mar 2006 12:27:56 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[Fedora-Core-5-PPC]]></category> <category><![CDATA[Snaptic-Package-Manager]]></category> <category><![CDATA[Ubuntu]]></category> <category><![CDATA[Ubuntu-PPC]]></category> <guid
isPermaLink="false">http://www.jappler.com/archive/2006/03/24/ubuntu-510-for-ppc/</guid> <description><![CDATA[Well, after some problems downloading the 3.3GB image of Fedora Core 5 and then my PowerBook not recognizing the DVD media (no, I was not about to re-download all five install CD images and burn them to CD&#8230;this is not 1993 again with installer floppies everywhere&#8230;and I did not have any other DVD media on hand), I decided to try a different flavor of Linux: Ubuntu. A few people that I I have been talking... <a
href="http://jappler.com/blog/archive/2006/03/24/ubuntu-510-for-ppc">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>Well, after some problems downloading the 3.3GB image of <a
href="http://fedora.redhat.com">Fedora Core 5</a> and then my PowerBook not recognizing the DVD media (no, I was not about to re-download all five install CD images and burn them to CD&#8230;this is not 1993 again with installer floppies everywhere&#8230;and I did not have any other DVD media on hand), I decided to try a different flavor of Linux: <a
href="http://www.ubuntu.com">Ubuntu</a>.  A few people that I I have been talking to recently either prefer <a
href="http://www.ubuntu.com">Ubuntu</a>, or have recently tried it, like <a
href="http://www.timfitz.net/">Tim</a>.  Since the install image is only 644.5MB, I decided it might be the time to try it out.<br
/> <br
/> From the very beginning, I was impressed.  I first had problems with my install because of a CD error, but to my delight, the Ubuntu installer gav eme an option to set up a web server with a click of a button which served all the installation log files so I could look at them and find the problem.  When I got home, I burned another copy and while my Comcast connection was out (TV and internet!) I installed and configured Ubuntu with ease.<br
/> <br
/> What I really like so far about Ubuntu:</p><ul><li>small install (one CD worth)</li><li>Ubuntu recognized all my hardware without me having to hack anything!</li><li>the ability to run Ubuntu from a CD (live CD)</li><li>awesome documentation in the help menu&#8230;the &#8220;Tips and Tricks&#8221; rock, and answered most of my questions</li><li>the &#8220;Snaptic Package Manager&#8221; which easily allows you to install packages</li><li>after installing packages with the &#8220;Snaptic Package Manager&#8221;, the new applications are put in appropriate menus, etc!</li><li>the great little sounds I get when clicking on buttons and icons <img
src='http://jappler.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /></li></ul><p>So far, I am extremely happy with Ubuntu and look forward to using it more and more.  It is plenty fast and if all goes well, I may see how it runs on my Apple cube so I can get that back into play.  As of now&#8230;this is, by far, my favorite flavor of Linux I have played with (Yellow Dog, Mandrake (Mandriva), Redhat, and Fedora FC3, FC4).  If you are looking to run Linux, give Ubuntu some attention &#8211; it gets the Jappler stamp of approval!<br
/> <br
/> PS.  Happy 5th birthday to Mac OS X today.  Five years ago, Mac OS X 10.0 was released!<br
/> [tags]Fedora Core 5 PPC, Ubuntu PPC, Snaptic Package Manager[/tags]</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2006/03/24/ubuntu-510-for-ppc/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>fedora core 5 for PPC users is available.</title><link>http://jappler.com/blog/archive/2006/03/20/fedora-core-5-for-ppc-users-is-available</link> <comments>http://jappler.com/blog/archive/2006/03/20/fedora-core-5-for-ppc-users-is-available#comments</comments> <pubDate>Mon, 20 Mar 2006 22:56:24 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[Fedora]]></category> <category><![CDATA[General]]></category> <category><![CDATA[Fedora-Core-5]]></category> <guid
isPermaLink="false">http://www.jappler.com/archive/2006/03/20/fedora-core-5-for-ppc-users-is-available/</guid> <description><![CDATA[I have not had any recent how-tos or informational articles, but I am hoping to end that dry spell tomorrow after I install and configure Fedora 5. I have been very happy with Fedora 3 and 4, and look forward to the most recent release. Stay tuned. PS&#8230;yeah I know that other builds, besides PPC are also out, but they are not my concern at this point. [tags]Fedora Core 5[/tags]]]></description> <content:encoded><![CDATA[<p>I have not had any recent how-tos or informational articles, but I am hoping to end that dry spell tomorrow after I install and configure <a
href="http://fedora.redhat.com/">Fedora 5</a>.  I have been very happy with Fedora 3 and 4, and look forward to the <a
href="http://fedora.redhat.com/docs/release-notes/fc5/test3-latest-en/#sn-OverView">most recent release</a>.  Stay tuned.<br
/> PS&#8230;yeah I know that other builds, besides PPC are also out, but they are not my concern at this point.<br
/> [tags]Fedora Core 5[/tags]</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2006/03/20/fedora-core-5-for-ppc-users-is-available/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>print out certain line numbers with sed.</title><link>http://jappler.com/blog/archive/2006/02/24/print-out-certain-line-numbers-with-sed</link> <comments>http://jappler.com/blog/archive/2006/02/24/print-out-certain-line-numbers-with-sed#comments</comments> <pubDate>Fri, 24 Feb 2006 12:20:48 +0000</pubDate> <dc:creator>Jen</dc:creator> <category><![CDATA[General]]></category> <category><![CDATA[Hints]]></category> <category><![CDATA[HOWTOs]]></category> <category><![CDATA[UNIX]]></category> <category><![CDATA[sed]]></category> <guid
isPermaLink="false">http://www.jappler.com/archive/2006/02/24/print-out-certain-line-numbers-with-sed/</guid> <description><![CDATA[It has been a year now since I completed my UNIX/Linux certification training and every once and awhile I think about my friend Perl, but I really enjoy helping others with some simple needs. Ben (yeah, I got him using WordPress too ) aked me a great recently: Question: If i have a huge log text fie and i want to pull a range of lines out of the middle, how can I easily do... <a
href="http://jappler.com/blog/archive/2006/02/24/print-out-certain-line-numbers-with-sed">Read More &#187;</a>]]></description> <content:encoded><![CDATA[<p>It has been a year now since I completed my UNIX/Linux certification training and every once and awhile I think about my friend <a
href="http://www.perl.org">Perl</a>, but I really enjoy helping others with some simple needs. <a
href="http://cyberdog.wordpress.org">Ben</a> (yeah, I got him using WordPress too <img
src='http://jappler.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ) aked me a great recently:<br
/> <br
/> <b>Question: If i have a huge log text fie and i want to pull a range of lines out of the middle, how can I easily do this?</b><br
/> <br
/> <b>Answer</b>: <code>sed -n '3,6 p' /var/log/httpd/error_log</code><br
/> <br
/> <b>Answer broken down</b>:</p><ul><li><a
href="http://www.gnu.org/software/sed/">sed</a> is the UNIX tool I chose for this.</li><li><code>-n</code> is used so that sed does not print out more than what I need.</li><li><code>'3,6 p'</code>indicates that I want lines 3-6 of the log file to print out (in the command line) and the <code>p</code> is used for: &#8220;If the substitution was made, then print the new pattern space.&#8221;</li><li><code>/var/log/httpd/error_log</code> specifies the log file that I need to extract data from</li></ul><p>Hope this comes in handy!<br
/> [tags] sed [/tags]</p> ]]></content:encoded> <wfw:commentRss>http://jappler.com/blog/archive/2006/02/24/print-out-certain-line-numbers-with-sed/feed</wfw:commentRss> <slash:comments>0</slash:comments> </item> </channel> </rss>
