<?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>gHacks Technology News &#124; Latest Tech News, Software And Tutorials &#187; linux commands</title> <atom:link href="http://www.ghacks.net/tag/linux-commands/feed/" rel="self" type="application/rss+xml" /><link>http://www.ghacks.net</link> <description>A technology news blog covering software, mobile phones, gadgets, security, the Internet and other relevant areas.</description> <lastBuildDate>Fri, 10 Feb 2012 20:51:26 +0000</lastBuildDate> <language>en</language> <sy:updatePeriod>hourly</sy:updatePeriod> <sy:updateFrequency>1</sy:updateFrequency> <generator>http://wordpress.org/?v=3.3.1</generator> <atom:link rel="hub" href="http://pubsubhubbub.appspot.com"/><atom:link rel="hub" href="http://superfeedr.com/hubbub"/> <item><title>Old school Linux tips</title><link>http://www.ghacks.net/2010/06/23/old-school-linux-tips/</link> <comments>http://www.ghacks.net/2010/06/23/old-school-linux-tips/#comments</comments> <pubDate>Wed, 23 Jun 2010 11:09:14 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Advanced]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command tips]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[linux commands]]></category> <category><![CDATA[output]]></category> <category><![CDATA[uptime]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=26987</guid> <description><![CDATA[Some times you just have to pull some tricks out of the vault.  These tips can be timeless, classic, or just retro. But generally speaking they still apply to users today. I&#8217;m not talking about how to backup to a tape drive, or using punch cards to create a program. I&#8217;m talking about tangible tips [...]]]></description> <content:encoded><![CDATA[<p>Some times you just have to pull some tricks out of the vault.  These tips can be timeless, classic, or just retro. But generally speaking they still apply to users today. I&#8217;m not talking about how to backup to a tape drive, or using punch cards to create a program. I&#8217;m talking about tangible tips and tricks that users can really use. Naturally, since these are mostly old school tips, they are going to be command line tips.</p><p><span
id="more-26987"></span><strong>Why?</strong></p><p>Why continue to break out more command line tips? Simple. Although it is very possible to get through the day (maybe even your entire Linux lifetime) without dropping to the command line, there are times when the command line is the best tool for the job. And knowing the command line in Linux is knowing power. So&#8230;let&#8217;s put some power at our fingertips.</p><p><strong>Uptime</strong></p><p>I had a friend once that had a Linux box with an uptime of over three years. THREE YEARS! The box finally came down because a NIC went bad and he had to shut it down to replace it. It broke his heart. Every day he would send me his uptime and we would both &#8220;oooh and ahhh&#8221; over it. How did he do this? The <em>uptime</em> command. This command does one thing and it does it well &#8211; it tells you how long your machine has been running. You issue this command like so:</p><p><em>uptime</em></p><p>When you issue the command you will see something like:</p><p><em>06:57:40 up 3 days, 22:15,  2 users,  load average: 0.93, 0.66, 0.49</em></p><p>(My uptime is lame right now. We had a nasty thunderstorm and I had to shut down my machines).</p><p>Some people, like myself, add their uptime to their email signatures. You can see how to do this in my article &#8220;<a
title="Add uptime and fortunes to your email signature" href="http://www.ghacks.net/2009/12/16/add-uptime-andor-a-daily-fortune-to-your-email-signature/" target="_blank">Add uptime and/or fortunes to your email signature</a>&#8220;.</p><p><strong>less is more </strong></p><p>One command line issue that might bug you is when you issue a command like <em>dmesg</em> and the output flashes by so quickly you can&#8217;t read it. There is a very simple way around this. If you pipe the output of the <em>dmesg</em> command to the <em>less </em>command you can read the output &#8220;one page at a time&#8221;. To do this you would issue the command like so:</p><p><em>dmesg | less</em></p><p><em></em> Or you use <em>more</em> to do the same thing (almost) like:</p><p><em>dmesg | more</em></p><p>The difference? With <em>less</em> you can scroll backwards. With <em>more</em> you can not.</p><p><strong>Save that output</strong></p><p>But what if you want to save your output of a command like <em>dmesg</em> so you look at it earlier or even email it to someone to look through? You can take multiple screenshots of each <em>less</em> page from <em>dmesg&#8230;</em>or&#8230;you can direct the output to a file. This is done like so:</p><p><em>dmesg &gt; FILE_NAME</em></p><p>Where FILE_NAME is the name of the file that will hold the output. NOTE: If you will be sending that output to a windows user you might want to include the .txt extension for easy opening.</p><p><strong>Final thoughts</strong></p><p>Sometimes those &#8220;old school&#8221; tips can really save your hide. Just because they are &#8220;old school&#8221; doesn&#8217;t mean they don&#8217;t have their uses. In fact, I make use of <em>less </em>and output re-direction every day. Once you start using them, you will find yourself using them more and more.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/06/23/old-school-linux-tips/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Top 5 top 5s for Linux</title><link>http://www.ghacks.net/2010/02/14/top-5-top-s-for-linux/</link> <comments>http://www.ghacks.net/2010/02/14/top-5-top-s-for-linux/#comments</comments> <pubDate>Sat, 13 Feb 2010 23:26:37 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[troubleshooting]]></category> <category><![CDATA[applications]]></category> <category><![CDATA[distributions]]></category> <category><![CDATA[linux commands]]></category> <category><![CDATA[Linux Desktops]]></category> <category><![CDATA[linux help]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=23047</guid> <description><![CDATA[I&#8217;ve been using Linux for longer than I can remember. Over those years I have written a number of &#8220;top 5&#8243; lists for various publications. So I thought it would be fun to share with the Ghacks readers my &#8220;top 5 top 5s&#8221;. I&#8217;ll give the category and a short description of each entry in [...]]]></description> <content:encoded><![CDATA[<p>I&#8217;ve been using Linux for longer than I can remember. Over those years I have written a number of &#8220;top 5&#8243; lists for various publications. So I thought it would be fun to share with the Ghacks readers my &#8220;top 5 top 5s&#8221;. I&#8217;ll give the category and a short description of each entry in the list. Hopefully you will find something new or something you had forgotten. With that said, let&#8217;s get to the lists.</p><p><span
id="more-23047"></span><strong>Top 5 distributions</strong></p><p><a
title="Ubuntu" href="http://www.ubuntu.com">Ubuntu</a>: Although it is not my desktop distribution of choice, it is my &#8220;go-to&#8221; distribution in just about any situation. And the only reason it is not my desktop distribution is because of the next entry.</p><p><a
title="Elive" href="http://www.elivecd.org">Elive:</a> Elive combines my two favorite desktop tools &#8211; Enlightenment and Compiz. Without Elive, these two would not work together.</p><p><a
title="Debian" href="http://www.debian.org">Debian:</a> It is that which Ubuntu is based. Need I say more?</p><p><a
title="OpenSuSE" href="http://www.opensuse.org/en/">OpenSuSE:</a> The YaST tool alone puts this distro in just about any top ten.</p><p><a
title="Fedora" href="http://fedoraproject.org/">Fedora:</a> I was a long standing Red Hat user so Fedora is a natural for a top ten distribution. And even though Fedora is &#8220;bleeding edge&#8221;, it&#8217;s still rock solid.</p><p><strong>Top 5 applications</strong></p><p>Let&#8217;s not pick nits and divide into categories. Let&#8217;s just see who bubbles up to the very tip-top.</p><p>1. <a
title="OpenOffice" href="http://www.openoffice.org" target="_blank">OpenOffice:</a> Let&#8217;s face it, without OpenOffice Linux, as a whole, wouldn&#8217;t stand a chance as a desktop distribution.</p><p>2. <a
title="Firefox" href="http://www.mozilla.com/en-US/firefox/" target="_blank">Firefox:</a> Although Chrome is my weapon of choice, it doesn&#8217;t always cut it. And Firefox is one of the most successful open source applications of all time.</p><p>3. <a
title="Claws Mail" href="http://www.claws-mail.org/" target="_blank">Claws Mail:</a> If you&#8217;ve not used Claws Mail, you don&#8217;t know how much email power you are missing out on.</p><p>4. <a
title="Nano" href="http://www.nano-editor.org/" target="_blank">Nano:</a> Nano is the text editor for all those who don&#8217;t want to have to bother with the cumbersome nature of vi or emacs. And without a tool like Nano, console-only Linux would be a real challenge.</p><p>5. <a
title="Apache" href="http://www.apache.org" target="_blank">Apache:</a> Do I really have to say why Apache is in a top &#8220;anything&#8221; list for open source (or Linux applications)?</p><p><strong>Top 5 desktops</strong></p><p>You&#8217;ll never see any favoritism in this category. Will you?</p><p>1. <a
title="Enlightenment" href="http://www.enlightenment.org" target="_blank">Enlightenment:</a> All the eye-candy, with have the weight of the big boys.</p><p>2. <a
title="GNOME" href="http://www.gnome.org" target="_blank">GNOME:</a> If you want a full-featured, reliable desktop, look no further than GNOME.</p><p>3. <a
title="KDE" href="http://www.kde.org" target="_blank">KDE:</a> Although KDE 4 began with a lot of issues, it has grown up to be quite a nice desktop.</p><p>4. <a
title="Compiz" href="http://www.compiz.org" target="_blank">Compiz:</a> Although not a desktop on its own, Compiz adds such amazing features to your desktop, it must be included.</p><p>5. <a
title="Fluxbox" href="http://www.fluxbox.org" target="_blank">Fluxbox:</a>If you are looking for the lightest weight desktop around, Fluxbox is your tool. It doesn&#8217;t offer all the bells and whistles, but it will bring new life to that old machine.</p><p><strong>Top 5 commands</strong></p><p><strong>1. </strong>mkdir: Need to create a directory?</p><p>2. cd: Need to change to a new directory?</p><p>3. ls: Need to list the contents of a directory?</p><p>4. tar: Need to unpack a tarball?</p><p>5. man *. Need to find out about a command?</p><p><strong>Top 5 places to get help with Linux</strong></p><p>1. <a
title="Ghacks" href="http://www.ghacks.net" target="_blank">Ghacks:</a> But of course.</p><p>2. Guru: Find yourself someone who knows Linux well and latch on. That&#8217;s how I got my start (with a shout out to Marc G.!)</p><p>3. Google: When in doubt, Google is your friend.</p><p>4. IRC: It&#8217;s old school, but there are plenty of Linux chat rooms still alive and filled with over-sized Linux brains.</p><p>5. Mailing lists: Just about every distribution has a mailing list. If you have a distro of choice, subscribe to that mailing list and read on.</p><p><strong>Final thoughts</strong></p><p>Do you have a top 5 that relates to Linux? If so, share it with your Ghacks readers.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/02/14/top-5-top-s-for-linux/feed/</wfw:commentRss> <slash:comments>15</slash:comments> </item> <item><title>Linux command line tips</title><link>http://www.ghacks.net/2010/01/18/linux-command-line-tips/</link> <comments>http://www.ghacks.net/2010/01/18/linux-command-line-tips/#comments</comments> <pubDate>Mon, 18 Jan 2010 16:14:53 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[bash history]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[linux commands]]></category> <category><![CDATA[tab completion]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=22425</guid> <description><![CDATA[I thought it would be useful to break away from all the GUI-goodness and offer up a few command line tips and tricks. Why? No matter how powerful, user-friendly, and modern the Linux desktop becomes, there may come a time when you want to step up your game and get down and dirty with the [...]]]></description> <content:encoded><![CDATA[<p>I thought it would be useful to break away from all the GUI-goodness and offer up a few command line tips and tricks. Why? No matter how powerful, user-friendly, and modern the Linux desktop becomes, there may come a time when you want to step up your game and get down and dirty with the command line interface. When you do, you will want your command-fu to be strong. And whether you are brand new to the command line, or have any level of familiarity with this tool, there are tips and tricks out there to make your life easier. This article should at least offer one or two of those tips&#8230;no matter your level of skill.</p><p><span
id="more-22425"></span><strong>Tab completion</strong></p><p>This tip is for the novice. There are a lot of commands on the Linux operating system (in my <strong>/usr/bin</strong> directory there is 1736 commands). Hard to remember all of them. Or sometimes a command will have a number of variations (like in the case of <em>beagle</em>) And sometimes, it&#8217;s just tiring typing all of those commands. Fortunately the Tab key is there to help you out. Open up your terminal window and do the following:</p><ol><li>Type <em>beagle</em></li><li>Hit the Tab key twice</li></ol><p>You should see a complete listing of all commands that start with <em>beagle</em>. Say you want to run <em>beagle-index-info</em>. You can do this by typing <em>beagle-ind</em> and then hitting the Tab key one time.</p><p><strong>Run second command with first commands arguments</strong></p><p>Say you need to find out what the directory <strong>/home/jlwallen/.e16/themes </strong>contains, but when you run the command <em>ls /home/jlwallen/.e16/themes</em> you see that the directory doesn&#8217;t exist. Looks like you will have to create that directory. Normally you would do this by typing <em>mkdir /home/jlwallen/.e16/themes </em>(or <em>mkdir ~/.e16/themes</em>). You can use a neat little trick to take the arguments from the previous command and add them to a new command like so:</p><p><em>mkdir !*</em></p><p>The above command would be the equivalent of (in our example above) <em>mkdir /home/jlwallen/.e16/themes</em>).</p><p><strong>Search your bash history</strong></p><p>If you can&#8217;t remember how you ran a specific command, you can use your bash history to help you. If you hit <strong>&lt;Ctrl&gt;r </strong>you will be in a special bash search prompt that looks like:</p><p><code>(reverse-i-search)`':</code></p><p>From this prompt you can enter a portion of the command and immediately see a command that contains what you type. If the command is the one you are looking for, hit the Enter key to execute that command.</p><p><strong>Another method of searching bash history</strong></p><p>This one is simple. If you can&#8217;t remember the last few commands you entered, just hit the up arrow on your keyboard to look through the list. When you find the command you want to run, hit Enter.</p><p><strong>Create recursive directories with one command</strong></p><p>Have you ever had to create entire directory trees and did so like:</p><p><em>mkdir ~/test</em></p><p><em>mkdir ~/test/test1</em></p><p><em>mkdir ~/test/test1/test2</em></p><p><em>mkdir ~/test/test1/test2/test3</em></p><p>You create all of these subdirectories with a single command:</p><p><em>mkdir -p ~/test/test1/test2/test3</em></p><p><strong>Run a second command only if first command succeeds</strong></p><p>You can string two commands together in such a way that the second of the two commands will work if (and only if) the first command succeeds. Let&#8217;s say you are going to use the <em>wget </em>command to download a tar file and then you want to immediately unpack that file. You could do so with this:</p><p><em>wget http://ADDRESS_OF_SERVER/filename.tgz &amp;&amp; tar xvzf filename.tgz</em></p><p>The above would unpack <em>filename.tgz </em>if (and only if) it is successfully downloaded.</p><p><strong>Final thoughts</strong></p><p>That should get you going for a bit. I&#8217;ll revisit this topic in the future so you can keep your command-fu skills sharp. And, by all means, if you have a cool command-line tip you want to share, please do so.</p><p><strong><br
/> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/01/18/linux-command-line-tips/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Linux Command Line Fu</title><link>http://www.ghacks.net/2009/02/18/linux-command-line-fu/</link> <comments>http://www.ghacks.net/2009/02/18/linux-command-line-fu/#comments</comments> <pubDate>Wed, 18 Feb 2009 09:37:30 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Operating Systems]]></category> <category><![CDATA[command line fu]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[linux command]]></category> <category><![CDATA[linux commands]]></category> <category><![CDATA[linux shell]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=10642</guid> <description><![CDATA[While most Linux operating systems come with their graphical user interface it sometimes is still important to work from the command line, especially if that is the only way to access a Linux server. Linux Command Line Fu is a Digg-like website that lives of its user contributions. Users can submit and vote for Linux [...]]]></description> <content:encoded><![CDATA[<p>While most Linux operating systems come with their graphical user interface it sometimes is still important to work from the command line, especially if that is the only way to access a Linux server. Linux <a
href="http://www.commandlinefu.com/commands/browse/sort-by-votes">Command Line Fu</a> is a Digg-like website that lives of its user contributions. Users can submit and vote for Linux command line gems.</p><p>Each submitted Linux command &#8211; to be honest there are a few command submissions for other operating systems but the majority is pure Linux &#8211; lists the command itself and a description provided by the author of the command. There will also be information about the author, the date the Linux command has been submitted and the amount of votes that it received.</p><p>Logged in users can vote, leave comments or report a command as malicious. Command-Line Fu can be accessed with an Open ID.</p><p><span
id="more-10642"></span><a
href="http://www.ghacks.net/wp-content/uploads/2009/02/linux_command.jpg"><img
src="http://www.ghacks.net/wp-content/uploads/2009/02/linux_command-499x200.jpg" alt="linux command" title="linux command" width="499" height="200" class="alignnone size-medium wp-image-10643" /></a></p><p>The site features a search engine and will also post new commands submitted to the site to a Twitter account. The site would do good to provide a list of all available commands to print it or save it in a text document format. It is still a very interesting resource for Linux users who work with the Linux command line regularly.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/02/18/linux-command-line-fu/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> </channel> </rss>
