<?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; command-line</title> <atom:link href="http://www.ghacks.net/tag/command-line/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>Have some Linux ascii fun with asciiquarium</title><link>http://www.ghacks.net/2011/03/02/have-some-linux-ascii-fun-with-asciiquarium/</link> <comments>http://www.ghacks.net/2011/03/02/have-some-linux-ascii-fun-with-asciiquarium/#comments</comments> <pubDate>Wed, 02 Mar 2011 19:54:41 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[aquarium]]></category> <category><![CDATA[ascii]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[perl]]></category> <category><![CDATA[terminal tricks]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=41993</guid> <description><![CDATA[Never let it be said that Linux users and developers do not have a sense of humor. Even the most hardcore of users, developers, designers, and administrators need something to serve as a distraction. Oh sure there&#8217;s always an endless array of web sites to take our attention, but that requires a GUI! What if [...]]]></description> <content:encoded><![CDATA[<p>Never let it be said that Linux users and developers do not have a sense of humor. Even the most hardcore of users, developers, designers, and administrators need something to serve as a distraction. Oh sure there&#8217;s always an endless array of web sites to take our attention, but that requires a GUI! What if you&#8217;re spending a lot of time on your GUI-less Apache server, file server, or any other type of Linux server? What then? NCurses can only do so much with text right? Not if you&#8217;re creative enough to install an ascii aquarium on your machine.</p><p>With this little ascii animation you can enjoy an animated pseudo-screensaver even on your GUI-less server. It won&#8217;t boost your productivity, it won&#8217;t make you a better programmer or your web site run faster. But it could bring you a bit of &#8220;security through obfuscation&#8221; from those who want to try to log onto your physical GUI-less workstation. Let&#8217;s see how to install and use this little under water wonder.</p><p><span
id="more-41993"></span><strong>Installation</strong></p><p>This little gem can be install on nearly any Linux distribution. As long as you have Perl installed, you should be able to get this up and running in no time. Here are the steps you need to follow. I will assume you might want to test this on a normal GUI-fied version of Linux before you try it on your GUI-less server. So, let&#8217;s install.</p><p>The first portion of the installation will take care of any remaining dependencies that aren&#8217;t included in the standard Perl installation. For this installation, follow these steps:</p><ol><li>Open up a terminal windows. If you are using a GUI-less server then just log in.</li><li>Change to the /tmp directory with the command <code>cd /tmp</code>.</li><li>Download the Terminal Animation package with the command <code>wget http://search.cpan.org/CPAN/authors/id/K/KB/KBAUCOM/Term-Animation-2.4.tar.gz</code>.</li><li>Unpack the Terminal Animation package with the command <code>tar -zxvf Term-Animation-2.4.tar.gz</code>.</li><li>Change into the newly created directory with the command <code>cd Term-Animation-2.4/</code>.</li><li>Build the makefile with the command <code>perl Makefile.PL &amp;&amp; make &amp;&amp; make test</code>.</li><li>Compile Terminal Animation with the command <code>sudo make install</code></li><p><code> </code></ol><p>Now to install the actually asciiquarium application. Follow these steps.</p><ol><li>Open a terminal window (again, if you are using a GUI-less server, just log in).</li><li>Change to the /tmp directory with the command <code>cd /tmp</code>.</li><li>Download the necessary package with the command <code>wget http://www.robobunny.com/projects/asciiquarium/asciiquarium.tar.gz</code>.</li><li>Unpack the asciiquarium package with the command <code>tar -zxvf asciiquarium.tar.gz</code>.</li><li>Change into the newly created directory with the command <code>cd asciiquarium</code>.</li><li>Copy the executable to the necessary directory with the command <code>sudo cp asciiquarium /usr/local/bin</code>.</li><li>Give the executable the proper permissions with the command <code>sudo chmod 0755 /usr/loca/bin/asciiquarium</code>.</li></ol><div
id="attachment_42003" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/03/asciiquarium.png"><img
class="size-medium wp-image-42003 " src="http://www.ghacks.net/wp-content/uploads/2011/03/asciiquarium-550x346.png" alt="" width="330" height="208" /></a><p
class="wp-caption-text">Figure 1</p></div><p>It is time to test out the waters of asciiquarium. To do so open up your terminal window (or if using a GUI-less machine &#8211; log in) and issue the command /usr/local/bin/asciiquarium. When it runs it will look something similar to Figure 1 (but in animated form).</p><p>Now, you may be asking yourself how could this serve as a form of security? Simple. Even with a standard desktop distribution you can log into a virtual terminal (Ctrl-Alt-F2 &#8211; for instance), log in, and run the application. Your full screen will be filled with the asciiquarium and unless a user knows to either hit Ctrl-c or move back to your original virtual terminal, they won&#8217;t have the slightest idea what to do.</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/03/02/have-some-linux-ascii-fun-with-asciiquarium/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>GNOME Terminal tricks and tips</title><link>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/</link> <comments>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/#comments</comments> <pubDate>Fri, 25 Feb 2011 20:17:27 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[gnome-terminal]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=40246</guid> <description><![CDATA[Do you use the terminal in Linux? If you use Linux long enough you will. And chances are, if you are using the terminal in Linux, you are using either the GNOME terminal or KDE&#8217;s konsole. Each has their pros and cons and each has a lot of tricks tucked up inside their sleeves. I [...]]]></description> <content:encoded><![CDATA[<p>Do you use the terminal in Linux? If you use Linux long enough you will. And chances are, if you are using the terminal in Linux, you are using either the GNOME terminal or KDE&#8217;s konsole. Each has their pros and cons and each has a lot of tricks tucked up inside their sleeves.</p><p>I have covered the gnome-terminal in a few ways (see my articles &#8220;<a
title="Make gnome-terminal work for you" href="http://www.ghacks.net/2010/07/18/make-gnome-terminal-profiles-work-for-you/" target="_blank">Make gnome-terminal profiles work for you</a>&#8221; and &#8220;<a
title="Get to know Linux: gnome-terminal" href="http://www.ghacks.net/2009/02/06/get-to-know-linux-gnome-terminal/" target="_blank">Get to know Linux: gnome-terminal</a>&#8220;.) These articles either is an introduction or deals with a specific aspect of the tool. This time around, I want to highlight a few different tips and tricks that can help to make gnome-terminal even more useful and user-friendly.</p><p><span
id="more-40246"></span><strong>Change that title</strong></p><p>When you open up gnome-terminal you usually will see the hostname and the current working directory. Sometimes this just isn&#8217;t much help. This is especially true when you have more than one terminal window open and you want to make sure you know which terminal you are working in. You can change this by clicking Terminal &gt; Set Title. After you click this a small window will open where you can type the new terminal title. Once you save that title your gnome-terminal will display the configured title until you close and re-open the tool (upon reopening the title will revert to the default.)</p><p><strong>Search the contents of an open file</strong></p><p>The gnome-terminal tool includes it&#8217;s own search feature. With an open file you can search that file with a string by clicking Search a new window will appear where you can enter the conditions for your search. Those conditions are:</p><ul><li>Search for: This is the string you want to search for in your file.</li><li>Mach case.</li><li>Match entire word only.</li><li>Match as regular expression.</li><li>Search backwards.</li><li>Wrap around.</li></ul><p>This is a great way to help you work with larger configuration files such as smb.conf or httpd.conf.</p><p><strong>Zoom in/out</strong></p><p>There are reasons for zoom in and out. The biggest reason is accessibility. For those with vision impairments, zooming into the terminal window is a quick way to make the text in terminal large enough to see. To zoom use the following key combinations:</p><ul><li>Zoom in: <code>Ctrl++</code></li><li>Zoom out: <code>Ctrl--</code></li></ul><p>If you have trouble with the key combinations, click View &gt; Zoom In or View &gt; Zoom Out to control the zoom.</p><p><strong>Switch dimensions</strong></p><p>I&#8217;m not talking about switching from 2D to 3D (or d20). I&#8217;m talking about the size of your terminal. There are four pre-configured sizes you can easily switch to (for different usage.) If you click the Terminal menu entry you will see, near the bottom of the menu:</p><ul><li>80&#215;24</li><li>80&#215;43</li><li>132&#215;24</li><li>132&#215;43</li></ul><p>You can easily switch to one of those sizes by clicking on the size you want. When you open the terminal, it will open back to the default size.</p><p><strong>Final thoughts</strong></p><p>There you have just a fraction of the tips and tricks that can be pulled off with gnome-terminal. There are plenty more where that come from and we will re-visit this topic. Until then, enjoy the CLI!</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/02/25/gnome-terminal-tricks-and-tips/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Using the Linux df command</title><link>http://www.ghacks.net/2011/02/25/using-the-linux-df-command/</link> <comments>http://www.ghacks.net/2011/02/25/using-the-linux-df-command/#comments</comments> <pubDate>Fri, 25 Feb 2011 13:53:56 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[df]]></category> <category><![CDATA[disk usage]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=40201</guid> <description><![CDATA[The Linux df command is an incredibly useful tool. What this command does is report file system disk usage. So when you want to see how much file system disk space is available, you can fire up your terminal and use df to learn everything you need to know about disk usage. But you don&#8217;t [...]]]></description> <content:encoded><![CDATA[<p>The Linux <em>df</em> command is an incredibly useful tool. What this command does is report file system disk usage. So when you want to see how much file system disk space is available, you can fire up your terminal and use <em>df</em> to learn everything you need to know about disk usage.</p><p>But you don&#8217;t want to just know the very basics of the command. Like anyone who hopes to master the Linux operating system, you want to know the commands in all their glory. With that in mind, let&#8217;s take an in-depth look at the df command and see what we can get out of it.</p><p><span
id="more-40201"></span><strong>Basic usage</strong></p><p>To understand the non-basic usage of the <em>df</em> command you must first understand the basic usage. So, the basic usage of <em>df </em>is:</p><p>df [OPTION] FILE</p><p>Where [OPTION] is any one (or combination) of the available options and FILE is a file located on a specific disk or partition. Don&#8217;t get confused about this. If you specify a file you will not see how much disk space the particular file uses. What you will see is the disk usage of the disk or partition the file resides on. This is a bit confusing at first.</p><p>The possible options are:</p><ul><li>a &#8211; Include dummy file systems.</li><li>-B &#8211; Use SIZE in blocks.</li><li>&#8211;total &#8211; Produce a grand total.</li><li>-h &#8211; Print sizes in human readable formats.</li><li>-H &#8211; Print sizes in human readable formats, but use powers of 1000 and not 1024.</li><li>-i &#8211; List inode information and not block usage.</li><li>-l &#8211; Limit listing to local file systems.</li><li>&#8211;no-sync &#8211; Do not invoke sync before getting usage information.</li><li>-P &#8211; Use POSIX output format.</li><li>&#8211;sync &#8211; Invoke sync before getting usage information.</li><li>-t &#8211; Limit listing to file systems of TYPE.</li><li>-T &#8211; Print file system type.</li><li>-x &#8211; Exclude file system type.</li></ul><p>Now, let&#8217;s piece some of these options together to make df really useful.</p><div
id="attachment_40202" class="wp-caption alignleft" style="width: 208px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/02/df_basic.png"><img
class="size-medium wp-image-40202  " src="http://www.ghacks.net/wp-content/uploads/2011/02/df_basic-550x355.png" alt="" width="198" height="128" /></a><p
class="wp-caption-text">Figure 1</p></div><div
id="attachment_40203" class="wp-caption alignright" style="width: 208px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/02/df_h.png"><img
class="size-medium wp-image-40203  " src="http://www.ghacks.net/wp-content/uploads/2011/02/df_h-550x355.png" alt="" width="198" height="128" /></a><p
class="wp-caption-text">Figure 2</p></div><p>Obviously, the basic usage is <em>df</em>. When you use that command you will see something like you see in Figure 1. If you&#8217;re looking for a much easier to read output, you would issue the command <em>df -h</em>. That will display everything in human readable format (see Figure 2).</p><p>Now, let&#8217;s add the partition types to the listing. To do this you would issue the command <em>df -hT. </em>This output would be similar to that in Figure 2, only it would add a column for Type before the Size column.</p><div
id="attachment_40204" class="wp-caption alignleft" style="width: 208px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/02/df_ah.png"><img
class="size-medium wp-image-40204  " src="http://www.ghacks.net/wp-content/uploads/2011/02/df_ah-550x355.png" alt="" width="198" height="128" /></a><p
class="wp-caption-text">Figure 3</p></div><p>If you have a need to know the size of dummy file systems (such as dev, usb, proc, etc) on your machine, you could run the command like <em>df -ah. </em>This will add rows to your listing that will look like that shown in Figure 3.</p><div
id="attachment_40225" class="wp-caption alignright" style="width: 208px"><a
href="http://www.ghacks.net/wp-content/uploads/2011/02/df_total.png"><img
class="size-medium wp-image-40225  " src="http://www.ghacks.net/wp-content/uploads/2011/02/df_total-550x355.png" alt="" width="198" height="128" /></a><p
class="wp-caption-text">Figure 4</p></div><p>What if you want to see a grand total of the percentage of disk space being used across all of your drives? To do this, issue the command <em>df &#8211;total</em> and you will see a new line added to the output that looks similar to what you see in Figure 4.</p><p><strong>Final thoughts</strong></p><p>A little <em>df</em> fun to help you gather all the knowledge you need with regards to how much space has been taken up on your disks. There are plenty of other tools to help you get this (and more) information from the command line. We&#8217;ll deal with more of those later.</p><p>&nbsp;</p><p>&nbsp;</p><p>&nbsp;</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/02/25/using-the-linux-df-command/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Some cool quick Linux command line tricks</title><link>http://www.ghacks.net/2011/02/21/some-cool-quick-linux-command-line-tricks/</link> <comments>http://www.ghacks.net/2011/02/21/some-cool-quick-linux-command-line-tricks/#comments</comments> <pubDate>Mon, 21 Feb 2011 19:31:51 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Uncategorized]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command line tips]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[gmail]]></category> <category><![CDATA[linux cli]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=40074</guid> <description><![CDATA[If you&#8217;ve used Linux long enough, you know there are some seriously cool tricks you can pull from the command line. Some of these tricks are just for fun, but the vast majority of them actually serve a purpose. It is the latter type of trick I want to highlight here. The purpose they serve [...]]]></description> <content:encoded><![CDATA[<p>If you&#8217;ve used Linux long enough, you know there are some seriously cool tricks you can pull from the command line. Some of these tricks are just for fun, but the vast majority of them actually serve a purpose. It is the latter type of trick I want to highlight here. The purpose they serve will all vary so you might only find one or two that are of use to you. But no matter if you find a command you can use immediately, you might be able to find one that you can modify to fit some need or other. With that said, let&#8217;s dig in.</p><p><span
id="more-40074"></span>NOTE: Since each of the below command serves a different purpose, you might have to install a piece of software to get it working. If there is a piece of software not included in the base Linux installation, I will make not of it and how to install the software.</p><p><strong>Monitor changing files in real time</strong></p><p>This command is fairly useful to watch your file system as it changes. It is more useful in just watching where changing files and percentages of drive space are critical. The command uses <em>watch</em>, <em>df</em>, and <em>ls </em>like so:</p><p><code>watch -d -n 2 'df; ls -FIAt;'</code></p><p>The above command will refresh every 2 seconds and show you what is being changed on your file system.</p><p><strong>Check your Amazon paid ranking</strong></p><p>I am a writer of novels (Check out my work on <a
title="Jack Wallen on Amazon.com" href="http://www.amazon.com/s/ref=nb_sb_noss?url=search-alias%3Ddigital-text&amp;field-keywords=jack+wallen&amp;x=0&amp;y=0" target="_blank">Amazon.com</a>) and frequently check my paid rankings on Amazon.com. By using the Linux operating system I am privy to the tools necessary to create a cron job to dump the rankings into a file for me to check. The command to do this makes use of <em>wget</em>, <em>grep</em>, <em>cut</em>, and <em>sed </em>and looks like:</p><p><code>wget -q -O - http://www.amazon.com/gp/product/XXXXXXXXXX | grep 'Paid in' | cut -d' ' -f1 | sed 's/[#,]//g' &gt;&gt; rank.log</code></p><p>Where XXXXXXXX is the code for the title you want to follow.</p><p><strong>Check your unread Gmail email</strong></p><p>Here&#8217;s a very handy command for those of you who use Gmail and would like to check for unread email without having to fire up a browser. This command makes use of: <em>curl, tr, awk, </em>and<em> sed </em>and looks like:</p><p><code>curl -u GMAIL_ADDRESS:GMAIL_PASSWORD --silent "https://mail.google.com/mail/feed/atom" | tr -d '\n' | awk -F '&lt;entry&gt;' '{for (i=2; i&lt;=NF; i++) {print $i}}' | sed -n "s/&lt;title&gt;\(.*\)&lt;\/title.*name&gt;\(.*\)&lt;\/name&gt;.*/\2 - \1/p"</code></p><p>Where GMAIL_ADDRESS is your actual gmail address and GMAIL_PASSWORD is your gmail password. Upon successful authentication the sender and subject of your unread Gmail will be printed out.</p><p><strong>Display a directory as a web page</strong></p><p>This command is incredibly handy. Say you want to allow someone access to files quickly via a web browser on your machine. You can do that with the help of python. All you do is change into the directory you want to serve up and then run the command:</p><p><code>python -m SimpleHTTPServer</code></p><p>Now, whoever needs to view that page simply points their browser to http://ADDRESS_OF_MACHINE:8000</p><p>Where ADDRESS_OF_MACHINE is either the IP Address or Domain of the machine (whichever applies). The user will then be able to navigate the files and folders within the directory you are serving up.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2011/02/21/some-cool-quick-linux-command-line-tricks/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Some helpful, but obscure, Linux admin tools</title><link>http://www.ghacks.net/2010/11/19/some-helpful-but-obscure-linux-admin-tools/</link> <comments>http://www.ghacks.net/2010/11/19/some-helpful-but-obscure-linux-admin-tools/#comments</comments> <pubDate>Fri, 19 Nov 2010 20:36:44 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[administration]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[monitoring]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=37074</guid> <description><![CDATA[Linux is resplendent with administration tools. No matter what you need to monitor, Linux has a tool to suit your needs. You can monitor everything from file I/O, to network processes, and everything in between. You can test systems, check systems, start and stop systems&#8230;you name it. There are so many tools it&#8217;s hard to [...]]]></description> <content:encoded><![CDATA[<p>Linux is resplendent with administration tools. No matter what you need to monitor, Linux has a tool to suit your needs. You can monitor everything from file I/O, to network processes, and everything in between. You can test systems, check systems, start and stop systems&#8230;you name it. There are so many tools it&#8217;s hard to know where to start. And some of those tools are not very well known. Of those lesser known tools, some of them are incredibly helpful.</p><p>I want to introduce you to a few of these handy, but little-known, Linux administration tools.</p><p><span
id="more-37074"></span><strong> </strong></p><div
id="attachment_37078" class="wp-caption alignleft" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/w.png"><img
class="size-medium wp-image-37078 " src="http://www.ghacks.net/wp-content/uploads/2010/11/w-550x389.png" alt="" width="330" height="233" /></a><p
class="wp-caption-text">Figure 1</p></div><p><strong>w</strong></p><p>The <em>w</em> command is a very simple tool that displays to you who is logged onto a system, when they logged in, and what processes they are using. This command is incredibly simple to use, just issue the command <em>w</em> and you will receive output similar to that shown in Figure 1.</p><p>As you can see the user <em>jlwallen</em> (that&#8217;s me) has been logged in since 14:19 and has four processes running.</p><p><strong>iostat</strong></p><div
id="attachment_37079" class="wp-caption alignright" style="width: 340px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/iostat.png"><img
class="size-medium wp-image-37079 " src="http://www.ghacks.net/wp-content/uploads/2010/11/iostat-550x389.png" alt="" width="330" height="233" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The <em>iostat</em> command (part of the <em>sysstat</em> program) will report CPU statistics and I/O statistics. As you can see, in Figure 2, <em>iostat</em> is broken into three sections:</p><p>Information: Information about kernel, hostname, date, and architecture.</p><p>Avg-CPU: This section gives you all of the information about your CPU on different levels (user, system, I/O, involuntary wait, and idle).</p><p>Device: This section offers statistics on a per physical device basis.</p><p><strong> </strong></p><div
id="attachment_37080" class="wp-caption alignleft" style="width: 340px"><strong><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/mpstat.png"><img
class="size-medium wp-image-37080 " src="http://www.ghacks.net/wp-content/uploads/2010/11/mpstat-550x389.png" alt="" width="330" height="233" /></a></strong><p
class="wp-caption-text">Figure 3</p></div><p><strong>mpstat</strong></p><p>The <em>mpstat </em>command will display a per-processor listing of processes. If you issue the command <em>mpstat -P ALL</em> you will see a listing of your processes for each CPU (see Figure 3). This command will report processes on a user, idle, nice, system, irq, involuntary wait, and guest level.</p><p>Instead of running this on all processors you can specify a processor with the -P argument.</p><p><strong> </strong></p><div
id="attachment_37083" class="wp-caption alignright" style="width: 340px"><strong><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/pmap.png"><img
class="size-medium wp-image-37083 " src="http://www.ghacks.net/wp-content/uploads/2010/11/pmap-550x389.png" alt="" width="330" height="233" /></a></strong><p
class="wp-caption-text">Figure 4</p></div><p><strong>pmap</strong></p><p>This tool is more used for developers as it will report bottlenecks in memory. You have to use it on a process ID (PID) like so:</p><p><em>pmap -d PID</em></p><p>Where PID is the actual process ID of the program you want to check.</p><p>As I already mentioned, the information output from this command will be helpful for developers and not much more.</p><div
id="attachment_37088" class="wp-caption alignleft" style="width: 340px"><strong><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/ss.png"><img
class="size-medium wp-image-37088 " src="http://www.ghacks.net/wp-content/uploads/2010/11/ss-550x389.png" alt="" width="330" height="233" /></a></strong><p
class="wp-caption-text">Figure 5</p></div><p><strong>ss</strong></p><p>The socket statistics command will give you output of all network sockets on your system. As you can see (in Figure 5) there are a lot of sockets to list on the average computer. This command is similar to <em>netstat</em> but is much faster at reporting. Figure 5 illustrates how <em>ss</em> does its reporting. Here you see localhost as well as some private IP addresses connecting to sockets on this particular machine.</p><p><strong> </strong></p><div
id="attachment_37089" class="wp-caption alignright" style="width: 340px"><strong><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/iptraf.png"><img
class="size-medium wp-image-37089 " src="http://www.ghacks.net/wp-content/uploads/2010/11/iptraf-550x377.png" alt="" width="330" height="226" /></a></strong><p
class="wp-caption-text">Figure 6</p></div><p><strong>iptraf</strong></p><p>The <em>iptraf </em>tool is one of my favorite text-based network monitoring tools. You won&#8217;t find iptraf installed by default (it&#8217;s generally in the default repositories for distributions, so it&#8217;s easy to install). Once you have iptraf installed you can start it by issuing the command <em>iptraf</em>. This tool allows you to create filters which can monitor specific network devices, addresses, packets, ports, and more.</p><p><strong>Conclusion</strong></p><p>The Linux operating system offers a ton of administration tools. Since many of those tools are commands, they wind up disappearing in obscurity. Here you have seen a few of those obscure commands. If you need more information on any of these commands you can check out the man page for each.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/19/some-helpful-but-obscure-linux-admin-tools/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>Use byobu for extended features in your terminal window</title><link>http://www.ghacks.net/2010/11/16/use-byobu-for-extended-features-in-your-terminal-window/</link> <comments>http://www.ghacks.net/2010/11/16/use-byobu-for-extended-features-in-your-terminal-window/#comments</comments> <pubDate>Tue, 16 Nov 2010 18:58:07 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[byobu]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[shell]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36950</guid> <description><![CDATA[The Japanese term &#8220;byobu&#8221; means a decorative, multi-paneled screen that serves as a room divider. You&#8217;ve probably seen them all over the place. When it comes to Linux, byobu is a small software that can be used on top of your standard terminal window to add extra functionality. What byobu really is is a wrapper [...]]]></description> <content:encoded><![CDATA[<p>The Japanese term &#8220;byobu&#8221; means a decorative, multi-paneled screen that serves as a room divider. You&#8217;ve probably seen them all over the place. When it comes to Linux, byobu is a small software that can be used on top of your standard terminal window to add extra functionality.</p><p>What byobu really is is a wrapper script that that launches the GNU Screen application using the byobu configuration. The user will see a strip along the bottom edge of the terminal window that gives a real-time update on various processes. Let&#8217;s take a look at this handy tool and see what all it can do.</p><p><span
id="more-36950"></span><strong>Installation</strong></p><p>ISince this is a console based tool, I will show you how to install it from the command line. Here&#8217;s how it&#8217;s done:</p><ol><li>Open up a terminal window.</li><li>Issue the command <code>sudo apt-get install byobu</code> (for Ubuntu) or <code>yum install byobu</code> (for Fedora). NOTE: For Fedora you will have to <em>su</em> to the root user prior to issuing the installation command.</li><li>Accept any dependencies that might be required.</li></ol><p>Once the installation is complete, you are ready to begin using byobu.</p><p><strong>Usage</strong></p><div
id="attachment_36953" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/byobu.png"><img
class="size-medium wp-image-36953 " src="http://www.ghacks.net/wp-content/uploads/2010/11/byobu-500x375.png" alt="" width="300" height="225" /></a><p
class="wp-caption-text">Figure 1</p></div><p>To use byobu, just enter the command <em>byobu</em> from the command prompt. When you do you will see the small strip appear at the bottom of your terminal (see Figure 1).</p><p>Figure 1 does show the <em>top </em>command running in the terminal to distinguish between a terminal in use and the byubu portion of the screen. If you end the top command, you will be left with an empty terminal window save for the bash prompt and the byobu strip at the bottom.</p><div
id="attachment_36954" class="wp-caption alignright" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/11/byobu_configuration.png"><img
class="size-medium wp-image-36954 " src="http://www.ghacks.net/wp-content/uploads/2010/11/byobu_configuration-500x375.png" alt="" width="300" height="225" /></a><p
class="wp-caption-text">Figure 2</p></div><p>The byobu interface will update in real time and can give you information regarding numerous systems or monitors. You can configure what you want byobu to monitor in the <strong>~/.byobu/status </strong>file OR you can simply hit F9 while byobu is running. When you hit F9 you will see the byobu configuration window (see Figure 2). From this window you can configure a number of options. To set (or unset) the notifications you want, scroll down (with arrow keys) to the Toggle status notifications and hit Enter. When you do you will see a simple window that lists all the possible notifications for byobu. Move through the list with your arrow keys and then hit the space bar to select any option you want to include (or not include). Once you have completed this hit the Tab button to get down to the Apply &#8220;button&#8221; to save your changes. Those changes will be made as soon as you click Apply.</p><p>From the main configuration window you can also change a number of features such as fore and background colors, keybinding, escape sequence, and more. You can even add new shells (which are similar to tabs). Once you&#8217;ve added new shells you can more back and forth between the shells by hitting the F2 button to move backwards and F3 to move forward. You can  have any number of shells you want.</p><p><strong>Final thoughts</strong></p><p>The byobu tool is a very cool way to add extra functionality to the standard terminal window. If you are looking for a bit more from the standard Linux shell, byobu is just what you need.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/16/use-byobu-for-extended-features-in-your-terminal-window/feed/</wfw:commentRss> <slash:comments>0</slash:comments> </item> <item><title>Enable Quick Edit Mode To Copy Command Prompt Items More Efficiently</title><link>http://www.ghacks.net/2010/11/05/enable-quick-edit-mode-to-copy-command-prompt-items-more-efficiently/</link> <comments>http://www.ghacks.net/2010/11/05/enable-quick-edit-mode-to-copy-command-prompt-items-more-efficiently/#comments</comments> <pubDate>Fri, 05 Nov 2010 19:31:58 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[command prompt]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[quick edit mode]]></category> <category><![CDATA[windows tips]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36576</guid> <description><![CDATA[The default way of copying items from the Windows command prompt is not the most effective option available. To copy items from the command line users need to right-click and select mark from the context menu. They then need to mark the commands and press Ctrl-v to copy them. That&#8217;s a cumbersome process, especially if [...]]]></description> <content:encoded><![CDATA[<p>The default way of copying items from the Windows command prompt is not the most effective option available. To copy items from the command line users need to right-click and select mark from the context menu. They then need to mark the commands and press Ctrl-v to copy them.</p><p>That&#8217;s a cumbersome process, especially if you copy and paste contents from the command line on a regular basis. Microsoft did however add an option to the command line preferences to make this whole operation more comfortable and natural.</p><p>The so called Quick Edit Mode enables direct copy and paste operations in the command line. You need to perform the following steps to enable the mode:</p><h3>How To Enable Quick Edit Mode</h3><p>Open a command line prompt. you can either open one by pressing Windows-R, typing cmd and hitting enter, or by clicking on the start menu orb, then All Programs > Accessories > Command Prompt. Please note that the second option is valid for Windows 7, it may differ on other Windows operating systems.</p><p>Once the command line is open right-click the title bar and select Properties from the context menu. A new window called Command Prompt Properties opens. Switch to the Options tab there and locate the entry Quick Edit Mode.</p><p><img
src="http://www.ghacks.net/wp-content/uploads/2010/11/quick-edit-mode.png" alt="quick edit mode" title="quick edit mode" width="386" height="474" class="alignnone size-full wp-image-36577" /></p><p>It is disabled by default and can be activated by clicking on its checkbox. A click on OK closes the properties window and returns to the command prompt window. It is from that moment on possible to select items on the screen by left-clicking, just like it is done in any word processor. Items can be copied with the keyboard shortcut Ctrl-C.</p><p>Have a different way of copying and pasting from the Windows command prompt? Let me know in the comments.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/05/enable-quick-edit-mode-to-copy-command-prompt-items-more-efficiently/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>Dealing with bash history</title><link>http://www.ghacks.net/2010/11/03/dealing-with-bash-history/</link> <comments>http://www.ghacks.net/2010/11/03/dealing-with-bash-history/#comments</comments> <pubDate>Wed, 03 Nov 2010 18:06:52 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[.bashrc]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[bash history]]></category> <category><![CDATA[command-line]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36507</guid> <description><![CDATA[If you are a Linux user who frequents the command line, you will most likely have heard of the bash history. This is a special system that keeps a history of all commands run from bash. This has many pros and only a few cons. One of the cons is that, if you are logged [...]]]></description> <content:encoded><![CDATA[<p>If you are a Linux user who frequents the command line, you will most likely have heard of the bash history. This is a special system that keeps a history of all commands run from bash. This has many pros and only a few cons. One of the cons is that, if you are logged onto your machine, someone can see your command line history. There are plenty of situations where you might not want this to happen. In that case, you have to delete your history.</p><p>Let&#8217;s take a look and see how this is done.</p><p><span
id="more-36507"></span><strong>Before we start&#8230;</strong></p><p>There is always a &#8220;before&#8221; right? In this case I wanted to touch base with everyone to make sure it is know how you can work with the bash history. There is one way the bash history is immediately useful to the user. The bash history makes it easy for recalling the last commands run. If you open up a terminal window and start hitting the up arrow on your keyboard you can run through all of the commands contained in your bash history.</p><p>So all you need to do is keep hitting the up arrow until you see the command you wanted to run. This will save you time by keeping you from having to type long commands over and over. It can also help you troubleshoot by showing you what commands you have recently run, which will allow you to deduce what has happened to your machine.</p><p><strong>How to delete the history</strong></p><p>There are two steps to deleting your bash history. The first step is to delete the <strong>~/.bash_history</strong> file. This won&#8217;t work completely because there will still be a history stored in RAM. So, to get rid of THAT history you have to run the command <em>history -c</em>. Once that command is issued, your bash history will be completely clear.</p><p><strong>Not keeping your history</strong></p><p>What if, for whatever reason, you do not want your bash history to be retained at all? You can do this. You can do this for either all users or specific users. To turn off bash history for all users you would need to issue the command:</p><p><code>echo "unset HISTFILE" &gt;&gt; /etc/profile</code></p><p>To turn off bash history for a single user issue the command:</p><p><code>echo "unset HISTFILE" &gt;&gt; /home/USER/.bash_profile</code></p><p>Where USER is the user you want bash history turned off.</p><p>Once you&#8217;ve done either of the above, bash history will be turned off for good.</p><p><strong>History size</strong></p><p>Remember, you can control the size of your bash history by editing the lines in your <strong>~/.bashrc </strong>file:</p><p>HISTSIZE=1000</p><p>Change the entry to match the amount of commands you want to retain in your history.</p><p><strong>Final thoughts</strong></p><p>Bash is an amazing and powerful tool for any and all Linux users. Although you do not have to ever touch the command line, in modern Linux desktops, you may someday have to use the command for either a server or remote access to another desktop. For whatever the reason, you will want to either take advantage of the bash history.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/03/dealing-with-bash-history/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Cool Linux command tricks</title><link>http://www.ghacks.net/2010/11/02/cool-linux-command-tricks/</link> <comments>http://www.ghacks.net/2010/11/02/cool-linux-command-tricks/#comments</comments> <pubDate>Tue, 02 Nov 2010 20:35:18 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command line interface]]></category> <category><![CDATA[command-line]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36472</guid> <description><![CDATA[The Linux command line is one of the most versatile tools you will ever use. It can do just about anything you can image for a machine. With such a large scope of tasks you can imagine just how much there is to learn. So, it&#8217;s always good  to have an arsenal of tricks at your [...]]]></description> <content:encoded><![CDATA[<p>The Linux command line is one of the most versatile tools you will ever use. It can do just about anything you can image for a machine. With such a large scope of tasks you can imagine just how much there is to learn. So, it&#8217;s always good  to have an arsenal of tricks at your fingertips.</p><p>So&#8230;let&#8217;s take a look at some nifty trickery with the Linux command line.</p><p><span
id="more-36472"></span><strong>seq</strong></p><p>This is one of the coolest (and most useful) tips I have ever come across.  The seq command will print out a sequence of numbers. So if you issue the command:</p><p><em>seq 0 50</em></p><p>You will see the numbers 0-50 printed out on the terminal. Very simple. Sure that&#8217;s great but what good is a sequence of numbers? Let&#8217;s apply it and find out. Remember you can always declare a value in bash and by making use of the $ symbol you can use variables in your commands. So what happens if you issue the command:</p><p><code>for k in `seq -w 1 50` ; do ssh 192.168.100.$k uptime ; done</code></p><p>What happens is ssh will walk through all the addresses from 192.168.100.1 to 192.168.100.50 until it finds one with an ssh server accepting connections. When it does it will ask you for the users password and then print out the uptime of that machine. Very handy indeed.</p><p><strong>How much space left?</strong></p><p>Quick, how much space do you have left on your drive(s)?  And where are those drives mounted on? Do you have the answer yet? If you had a terminal window open you could have issued the command <em>df -h </em> and you would have seen, in a user-friendly format, the percentage of your hard disk space that has been used. Very handy command.</p><p><strong>Those pesky bash colors</strong></p><p>Do you prefer the colors you see in bash? Do you even know about the colors in bash? From the command line issue the command <em>ls</em> you will see that files are black, folders are blue, executables are green (that&#8217;s a simplistic explanation). What if those colors bother you (or cause your pretty transparent terminal from giving you a good read on your file listing)? You can turn that off easily from the command by issuing:</p><p><code>ls --color=none</code></p><p>Of course that is a one-time deal. In order to make this permanent you have to edit your <strong>~/.bashrc</strong> file. In that file you will see the following entry:</p><p><code>alias ls='ls --color=auto'</code></p><p>Comment out that entry and <em>ls</em> will no longer use color.</p><p><strong>Find files modified TODAY</strong></p><p>If you have saved a file today and you can&#8217;t remember where you saved it, you can use the <em>find </em>command to print out all files modified today. The command:</p><p><code>find ~ -type f -mtime 0</code></p><p>Will print out a listing of all files that were modified on the day the command was issued (today).</p><p><strong>Install from source to package</strong></p><p>That might not make any sense. It will in a moment. Say you&#8217;ve downloaded the source for a package that you want to install, but you want to keep with the standard for your distribution by installing it from a package (so your package manager is aware of it). You can do this with the help of the <em>checkinstall</em> application. This isn&#8217;t installed by default, but you can install it with the command <em>sudo apt-get install checkinstall</em>. Once installed you can install from source with the command (from within the source code directory):</p><p><code>./configure &amp;&amp; make &amp;&amp; checkinstall</code></p><p>This will ask you some questions regarding your distribution and will install the application.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/11/02/cool-linux-command-tricks/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Linux dictionary tools</title><link>http://www.ghacks.net/2010/10/24/linux-dictionary-tools/</link> <comments>http://www.ghacks.net/2010/10/24/linux-dictionary-tools/#comments</comments> <pubDate>Sun, 24 Oct 2010 13:18:04 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[dictionaries]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36160</guid> <description><![CDATA[The dictionary is a tool that any writer or student should have on their computer. And Linux users are not immune from this need. But if you look through the possibilities of Linux dictionary tools you find quite a large amount available. Which of these tools are the best or easiest to use? I have [...]]]></description> <content:encoded><![CDATA[<p>The dictionary is a tool that any writer or student should have on their computer. And Linux users are not immune from this need. But if you look through the possibilities of Linux dictionary tools you find quite a large amount available. Which of these tools are the best or easiest to use?</p><p>I have found, outside of using an application&#8217;s built-in spell checking, two particular tools that I prefer. These tools are GoldenDict and Dict. The former is a splendid GUI tool, whereas the latter is a lightning-quick command line tool. Let&#8217;s see which of these tools suits your needs best.</p><p><span
id="more-36160"></span><strong>GoldenDict</strong></p><p>GoldenDict is a feature-rich graphical dictionary program that allows the user to take advantage of multiple local dictionaries as well various on-line dictionaries. It&#8217;s easy to use and actually works in conjunction with other applications.</p><p>To install GoldenDict just do the following:</p><ol><li>Open up your Add/Remove Software Utility.</li><li>Search for &#8220;goldendict&#8221; (No quotes).</li><li>Mark GoldenDict for installation.</li><li>Click Apply to install.</li></ol><div
id="attachment_36161" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/10/goldendict.png"><img
class="size-medium wp-image-36161 " src="http://www.ghacks.net/wp-content/uploads/2010/10/goldendict-500x431.png" alt="" width="300" height="259" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Once installed, you will find GoldenDict in the <strong>Applications &gt; Office </strong>menu.</p><p>When you fire up GoldenDict you will the main window where you can take care of all of your lookups (see Figure 1). The usage is fairly straight-forward. You enter your word in the &#8220;Look up&#8221; text area and hit Enter. The results will appear as the disambiguation in the left pane and the actual definition in the right pane.</p><p>Now&#8230;let&#8217;s say you want to extend GoldenDict out to your other applications. If you click on <strong>Edit &gt; Preferences</strong> and then click on the Scan Popup tab you can enable GoldenDict to work on any text you highlight in any application. I will warn you&#8230;this can get in the way of every day use. To that end I always enable this feature but enable it along with the &#8220;Only show popup when all selected keys are kept pressed&#8221;. With this feature you can configure a key (either Alt, Ctrl, Shift, or Meta) that must be pressed along with the word selection. When this combination is done a popup will appear definining the word.</p><p><strong>Dict</strong></p><p>Now let&#8217;s take a look at a much simpler tool &#8211; dict. Dict is a command line only tool that allows you to search online dictionaries (or local dictionaries if you have them installed) for word definitions. Installing dict is simple:</p><ol><li>Open up a terminal window.</li><li>Issue the command <em>sudo apt-get install dict</em> (or a suitable command for your distribution).</li><li>Accept the dependencies.</li><li>Wait until the installation is complete.</li></ol><p>When you have dict installed, the usage is simple:</p><p><em>dict -h SERVER WORD</em></p><p>Where SERVER is the server you want to use and WORD is the word you want to look up. Normally you could just issue <em>dict WORD</em> but currently the default servers for dict are all not responding. So in order to get around that you need to define a server to use. One server that is working is dict.tu-chemnitz.de. To use this server you would issue the command:</p><p><code>dict -h dict.tu-chemnitz.de WORD</code></p><p>Where WORD is the word you want to look up. You would then be rewarded with the definition of the word in question.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/10/24/linux-dictionary-tools/feed/</wfw:commentRss> <slash:comments>7</slash:comments> </item> <item><title>Multi-view terminal with Terminator</title><link>http://www.ghacks.net/2010/10/21/multi-view-terminal-with-terminator/</link> <comments>http://www.ghacks.net/2010/10/21/multi-view-terminal-with-terminator/#comments</comments> <pubDate>Thu, 21 Oct 2010 21:14:36 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[terminal window]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=36104</guid> <description><![CDATA[I do enjoy the terminal. Although it&#8217;s not necessary in modern Linux iterations, it&#8217;s always great to know that terminal is there when you need it. Terminal power users have TONS of options. You can use the multi-talented Guake (see my article &#8220;Guake: Hide-able terminal goodness&#8220;), you can opt for the standard Xterm, or the [...]]]></description> <content:encoded><![CDATA[<p>I do enjoy the terminal. Although it&#8217;s not necessary in modern Linux iterations, it&#8217;s always great to know that terminal is there when you need it. Terminal power users have TONS of options. You can use the multi-talented Guake (see my article &#8220;<a
title="Guake" href="http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/" target="_blank">Guake: Hide-able terminal goodness</a>&#8220;), you can opt for the standard Xterm, or the highly configurable Eterm, Aterm, Gnome-Terminal, and/or Konsole.</p><p>But what if you are a serious power user who wants multiple terminal windows open, but doesn&#8217;t want to deal with tabs? Is there a tool for you? Why yes there is. That tool is Terminator. Terminator is a multi-view terminal window that will have you doing console backflips and other impressive feats of administrative kung-fu. Let&#8217;s take a look at this magic tool.</p><p><span
id="more-36104"></span><strong>Installation</strong></p><p>As usual, the installation of Terminator is as simple as the following:</p><ol><li>Open up a terminal window.</li><li>Issue the command <code>sudo apt-get install terminator</code>.</li><li>Type your sudo password and hit Enter.</li><li>Accept any dependencies that are necessary.</li><li>Close out the terminal when the installation is complete.</li></ol><p>You are now ready to be wow&#8217;d via terminal.</p><p><strong>General usage</strong></p><div
id="attachment_36105" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/10/terminator.png"><img
class="size-medium wp-image-36105 " src="http://www.ghacks.net/wp-content/uploads/2010/10/terminator-500x323.png" alt="" width="300" height="194" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Starting Terminator is simple. You can either click <strong>Applications &gt; Accessories &gt; Terminator</strong> or you can click Alt+F2 and then enter <em>terminator</em> in the run dialog. When you do start up terminator you will see what looks like a standard terminal window. It&#8217;s not until you start really playing around with this tool that you discover what it can do.</p><p>When Terminator is open you can use the following key combinations:</p><ul><li>Ctrl-Shift-E: To split the view vertically.</li><li>Ctrl-Shift-O: To split the view horizontally.</li><li>Ctrl-Shift-P: For focus to be active on the previous view.</li><li>Ctrl-Shift-N: For focus to be active on the next view.</li><li>Ctrl-Shift-W: To close the focused view.</li><li>Ctrl-Shift-Q: To exit terminator.</li><li>F11: Fullscreen.</li></ul><p>A <em>view</em> can be thought of as a pane. Figure 1 shows Terminator open with four views. To get this I would focus on the original, single pane and hit the combination <em>Ctrl-Shift-E</em> which would split the pane into two vertical panes. Now, with the focus on the left pane click <em>Ctrl-Shift-O</em> and it will split the left pane into two horizontal panes. Finally, with the focus on the right vertical pane, click <em>Ctrl-Shift-O </em>to split the right pane into two horizontal panes. You should now have four smaller panes which to use.</p><p>NOTE: You can also start Terminator borderless from the command line using the <em>-b</em> switch like so:</p><p><em>terminator -b</em></p><p><strong>Groups</strong></p><p>You can also create groups and then apply each pane to one of those groups. This makes keeping Terminator organized much easier. To do this click on the upper left corner of one of the panes and then select New Group from the drop-down. Give the group a name and then, once you have all of your groups created, you can associated each pane to a particular group. You can also remove groups from the same dropdown menu. NOTE: When you close terminator you lose all of your groups.</p><p><strong>Final thoughts</strong></p><p>If you are a terminal power user you will certainly appreciate the power Terminator offers. Give this a try and see if your ADHD is made happy with this handy tool.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/10/21/multi-view-terminal-with-terminator/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <item><title>emelFM2: Another fast file manager</title><link>http://www.ghacks.net/2010/09/08/emelfm2-another-fast-file-manager/</link> <comments>http://www.ghacks.net/2010/09/08/emelfm2-another-fast-file-manager/#comments</comments> <pubDate>Wed, 08 Sep 2010 11:26:11 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tools]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[file manager]]></category> <category><![CDATA[files]]></category> <category><![CDATA[gtk]]></category> <category><![CDATA[mc]]></category> <category><![CDATA[midnight commander]]></category> <category><![CDATA[norton commander]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=34063</guid> <description><![CDATA[Today I&#8217;m going to take a look at another lightweight Linux (and UNIX-like) file manager (and this time I WON&#8217;T get the name wrong) called emelFM2. This particular file manager will pull at the heart-strings of old school Linux and UNIX users because it is based on the old Norton Commander file manager (which was [...]]]></description> <content:encoded><![CDATA[<p>Today I&#8217;m going to take a look at another lightweight Linux (and UNIX-like) file manager (and this time I WON&#8217;T get the name wrong) called <a
title="emelFM2" href="http://emelfm2.net/" target="_blank">emelFM2</a>. This particular file manager will pull at the heart-strings of old school Linux and UNIX users because it is based on the old Norton Commander file manager (which was the inspiration for Midnight Commander). So anyone who&#8217;s used Linux long enough will know exactly what they are in for: double paned goodness with a strip down the middle containing action buttons to enact upon selected files and directories.</p><p>Although you won&#8217;t find all of the standard features found in most modern file managers, you will find emelFM2 has a few tricks of its own that make it worth (at least) giving a try. And, of course, any old school user will be happy to have this file manager sitting alongside the standard Nautilus, Dolphin, or Thunar.</p><p>In this Ghacks article I will show you how to install and make use of the emelFM2 file manager.</p><p><span
id="more-34063"></span><strong>Installation</strong></p><p>Since emelFM2 is a GTK+ toolkit it&#8217;s fairly universal on X11 systems. I found emelFM2 in both the standard repositories for Ubuntu 10.04 and Fedora 13. So installation can be as simple as:</p><ol><li>Open up your Add/Remove Software tool.</li><li>Search for &#8220;emelfm2&#8243; (no quotes).</li><li>Mark emelFM2 for installation.</li><li>Click Apply to install.</li></ol><p>Once installed, you will find emelFM2 in <strong>Start &gt; System Tools &gt; emelFM2</strong>.</p><p><strong>Usage</strong></p><div
id="attachment_34064" class="wp-caption alignleft" style="width: 510px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/09/emelfm2.png"><img
class="size-medium wp-image-34064" src="http://www.ghacks.net/wp-content/uploads/2010/09/emelfm2-500x394.png" alt="" width="500" height="394" /></a><p
class="wp-caption-text">Figure 1</p></div><p>When you start up emelFM2 the window that greets you will look very familiar (see Figure 1). If you&#8217;ve ever used Midnight Commander or even an FTP application like gFTP, you will be immediately at home with emelFM2.</p><p>Let&#8217;s say you want to move a file (or directory) from one location to another. To do so you would navigate on the left pane to the source, select the file (or folder), navigate on the right to the target, and then click the Move button in the middle of the panes.</p><p>Or say you want to just open a file. To do this you would navigate to the location of the file on either the left or right pane, and double click the file to open it. You could also right-click the file and select from any number of actions (such as change ownership, change permissions, copy, link, link-as, delete, and more).</p><p><strong>Other features</strong></p><p>Naturally, a tool like this would need some other features to make it attractive. And emelFM2 doesn&#8217;t disappoint. One of the nice handier features of emelFM2 is the built-in command line tool. at the bottom of the window you will see a small text area (see Figure 1). This text area allows you to enter commands that will be enacted upon the selected file.</p><p>You can also calculate disk usage of items. You might be asking yourself why this would be useful, since the file size is already displayed in the main panes. The disk usage tool allows you to calculate the exact file size of either a single file or multiple files. With this you can select multiple files and the click the disk usage button (bottom section of the window, eighth icon from the right) to give you the total amount used by the selected files.</p><p>emelFM2 also allows you to mount/unmount devices. To unmount a device you would select the device in either pane and then click the unmount icon (fourth button from the right near the bottom of the window). To mount a device you use the same process.</p><p>emelFM2 also has an interesting take on the filtering task. If you click the Filter icon (top right, third from the right for the right pane, top left, third from the left for the left pane) a drop-down will appear allowing you to select from:</p><ul><li>Name Filter</li><li>Size Filter</li><li>Date Filter</li><li>Directories too</li></ul><p>When you select any of he top three a new window will open allowing you to create a specific filter. For example, if you want to filter only files modified since a specific date, you would do the following:</p><p>Select the Date Filter</p><p>In the resulting window select &#8220;modified since&#8221; from the drop-down.</p><p>Enter the date you want to specify.</p><p>Click OK.</p><div
id="attachment_34065" class="wp-caption alignright" style="width: 102px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/09/emelfm2_filter.png"><img
class="size-full wp-image-34065" src="http://www.ghacks.net/wp-content/uploads/2010/09/emelfm2_filter.png" alt="" width="92" height="30" /></a><p
class="wp-caption-text">Figure 2</p></div><p>As soon as you click OK the directory will be refreshed to show only the results that match your filter. You will know when a directory is being filtered because the filter icon will have a line slashed through it (see Figure 2).</p><p><strong>Final thoughts</strong></p><p>Although many users might find emelFM2 a bit out-dated, anyone that was weened on the likes of Midnight Commander will find themselves right at home with this fast, light file manager. And with a few extra features rolled in, emelFM2 is an attractive alternative to the usual fare.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/09/08/emelfm2-another-fast-file-manager/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> <item><title>Use Forfiles To Process Files Based On Age</title><link>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/</link> <comments>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/#comments</comments> <pubDate>Thu, 05 Aug 2010 17:30:44 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[forfiles]]></category> <category><![CDATA[windows tips]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=31880</guid> <description><![CDATA[It is always good to know some command line magic, as it is sometimes easier to process commands that way. This guide demonstrates the Forfiles command in Windows Vista and Windows 7. Forfiles can process files based on names, file extensions and age. It is for instance possible to find all documents in a directory [...]]]></description> <content:encoded><![CDATA[<p>It is always good to know some command line magic, as it is sometimes easier to process commands that way. This guide demonstrates the Forfiles command in Windows Vista and Windows 7. Forfiles can process files based on names, file extensions and age. It is for instance possible to find all documents in a directory that are older than 20 days, or all documents in c:\documents that have been changed since a specific date.</p><p>The forfiles command can be coupled with processing options to delete those files, or create a list of all files that match the filters. Lets take a closer look at the forfiles command.</p><p><span
id="more-31880"></span><br
/><blockquote>FORFILES [/P pathname] [/M searchmask] [/S]<br
/> [/C command] [/D [+ | -] {dd/MM/yyyy | dd}]</p><p>Description:<br
/> Selects a file (or set of files) and executes a<br
/> command on that file. This is helpful for batch jobs.</p><p>Parameter List:<br
/> /P    pathname      Indicates the path to start searching.<br
/> The default folder is the current working<br
/> directory (.).</p><p> /M    searchmask    Searches files according to a searchmask.<br
/> The default searchmask is &#8216;*&#8217; .</p><p> /S                  Instructs forfiles to recurse into<br
/> subdirectories. Like &#8220;DIR /S&#8221;.</p><p> /C    command       Indicates the command to execute for each file.<br
/> Command strings should be wrapped in double<br
/> quotes.</p><p> The default command is &#8220;cmd /c echo @file&#8221;.</p><p> The following variables can be used in the<br
/> command string:<br
/> @file    &#8211; returns the name of the file.<br
/> @fname   &#8211; returns the file name without<br
/> extension.<br
/> @ext     &#8211; returns only the extension of the<br
/> file.<br
/> @path    &#8211; returns the full path of the file.<br
/> @relpath &#8211; returns the relative path of the<br
/> file.<br
/> @isdir   &#8211; returns &#8220;TRUE&#8221; if a file type is<br
/> a directory, and &#8220;FALSE&#8221; for files.<br
/> @fsize   &#8211; returns the size of the file in<br
/> bytes.<br
/> @fdate   &#8211; returns the last modified date of the<br
/> file.<br
/> @ftime   &#8211; returns the last modified time of the<br
/> file.</p><p> To include special characters in the command<br
/> line, use the hexadecimal code for the character<br
/> in 0xHH format (ex. 0&#215;09 for tab). Internal<br
/> CMD.exe commands should be preceded with<br
/> &#8220;cmd /c&#8221;.</p><p> /D    date          Selects files with a last modified date greater<br
/> than or equal to (+), or less than or equal to<br
/> (-), the specified date using the<br
/> &#8220;dd/MM/yyyy&#8221; format; or selects files with a<br
/> last modified date greater than or equal to (+)<br
/> the current date plus &#8220;dd&#8221; days, or less than or<br
/> equal to (-) the current date minus &#8220;dd&#8221; days. A<br
/> valid &#8220;dd&#8221; number of days can be any number in<br
/> the range of 0 &#8211; 32768.<br
/> &#8220;+&#8221; is taken as default sign if not specified.</p><p> /?                  Displays this help message.</p></blockquote><p>This help file can be opened by entering the command forfiles /? in a command prompt. Press Windows-R, type cmd, and hit enter to launch the command line in Windows.</p><p>The command</p><p><code>forfiles /P c:\test\ /M .doc /S /D -10</code></p><p>searches the directory c:\test and all its subdirectories for files with the .doc extension that are older than 10 days.</p><p>The parameter /p followed by a directory defines the starting directory, /s includes subdirectories in the search, /m filters the files and folders based on the entered string, and /D defines the date or a time span.</p><p>The /C command is used to process the files that are found further. It can for instance be used to</p><p><code>/C "cmd /c echo @fname" > test.txt</code></p><p>echo the names of each file found and save the results in text.txt in the same directory.</p><p>The full command then looks like this</p><p><code>forfiles /P c:\test\ /M .doc /S /D -10 /C "cmd /c echo @fname" > test.txt</code></p><p>Another possibility is to delete the files that match the search, this is done with the command</p><p><code>/C "cmd /c del @File</code></p><p>It is however recommended to test the output first, before issuing the delete command to make sure that only the right files are deleted.</p><p>Experienced users may create a batch file to execute forfiles regularly.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/08/05/use-forfiles-to-process-files-based-on-age/feed/</wfw:commentRss> <slash:comments>6</slash:comments> </item> <item><title>Make gnome-terminal profiles work for you</title><link>http://www.ghacks.net/2010/07/18/make-gnome-terminal-profiles-work-for-you/</link> <comments>http://www.ghacks.net/2010/07/18/make-gnome-terminal-profiles-work-for-you/#comments</comments> <pubDate>Sun, 18 Jul 2010 13:18:56 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[administrative user]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[root]]></category> <category><![CDATA[terminal emulator]]></category> <category><![CDATA[terminal window]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=28349</guid> <description><![CDATA[The gnome-terminal is one of the finest terminals available for the Linux operating system. It&#8217;s rock-solid, does it&#8217;s job, and has a ton of features you might not find in other terminal emulators. One of those features is the Profile. A profile is a way to have multiple terminal configurations at once. You can create [...]]]></description> <content:encoded><![CDATA[<p>The gnome-terminal is one of the finest terminals available for the Linux operating system. It&#8217;s rock-solid, does it&#8217;s job, and has a ton of features you might not find in other terminal emulators. One of those features is the Profile. A profile is a way to have multiple terminal configurations at once. You can create as many as you like and switch back and forth on the fly. But why have this feature? Is it really necessary? I can show you a few reasons why the gnome-terminal profile offers you multiple profiles.</p><p>In this article I will walk you through the creation of new profiles and show you why you might want them.</p><p><span
id="more-28349"></span><strong>Assumptions</strong></p><p>First and foremost, this article assumes you actually use the terminal and assumes you use it a lot. The pedestrian user of the terminal might not see a need for multiple profiles for a terminal window. But if you use the terminal a lot, and for various reasons, you might see how multiple profiles can make a difference.</p><p><strong>Creating new profiles</strong></p><div
id="attachment_28350" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/07/gnome_terminal_profile_editor.png"><img
class="size-medium wp-image-28350 " src="http://www.ghacks.net/wp-content/uploads/2010/07/gnome_terminal_profile_editor-500x334.png" alt="" width="300" height="200" /></a><p
class="wp-caption-text">Figure 1</p></div><p>Let us first take a look at how profiles are created. To create (or edit) a profile click <strong>Edit &gt; Profiles</strong>. This will bring up a new window (see Figure 1) where you can add, edit, or delete profiles at will.</p><p>As you can see, in Figure 1, I have two current profiles &#8211; default and &#8220;no trans&#8221;. My default profile fits in with my current desktop scheme (RGBA, with heavy transparency). There are times when I need to more closely evaluate text (such as when viewing <em>top</em> or combing through a configuration file. For those times I switch to the &#8220;no trans&#8221; profile which is a non-transparent profile I created.</p><p>To create a new profile click the New button. When you do this a small window will open where you give your new profile a name <a
href="http://www.ghacks.net/wp-content/uploads/2010/07/gnome_profile_editor.png"><img
class="alignright size-full wp-image-28351" src="http://www.ghacks.net/wp-content/uploads/2010/07/gnome_profile_editor.png" alt="" width="446" height="334" /></a>and choose which of your current profiles to base the new profile on. Let&#8217;s say, for the sake of example, I want to create a profile for any time I am using the terminal as the root user. This can come in very handy (and keep you from doing something you don&#8217;t want to do).  For this I am going to call the profile &#8220;Root&#8221; and base it on &#8220;no trans&#8221;. Once you&#8217;ve done that the main profile editor window will appear (see Figure 2) .</p><p>In this new window you can change quite a bit for your profile. For a profile to work as the administrative user you might want to do something like create a white background with red text, or a red background with black text. For such an instance I like to alter the Title and command to ensure there is no mistaking I am using the administrative user. To do this click on the Title and Command tab and then change the Initial title to be something like <em>ROOT User: USE CAUTION</em>. You can then select to prepend this title if the terminal command sends it&#8217;s own title (which is often the case).</p><div
id="attachment_28352" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/07/root_profile.png"><img
class="size-medium wp-image-28352 " src="http://www.ghacks.net/wp-content/uploads/2010/07/root_profile-500x354.png" alt="" width="300" height="212" /></a><p
class="wp-caption-text">Figure 3</p></div><p>The new &#8220;root&#8221; profile will look something like that in Figure 3.</p><p><strong>Switching profiles</strong></p><p>This is simple, and can be done on the fly. All you need to do is click <strong>Terminal &gt; Change Profile </strong>and select the profile you want.</p><p><strong>Final thoughts</strong></p><p>Make use of the gnome-terminal profiles and your life will be much easier. There are a lot of reasons why you would want to use them and tons of modifications you can make to them.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/07/18/make-gnome-terminal-profiles-work-for-you/feed/</wfw:commentRss> <slash:comments>5</slash:comments> </item> <item><title>How To Uninstall Software In Windows Safe Mode</title><link>http://www.ghacks.net/2010/07/18/how-to-uninstall-software-in-windows-safe-mode/</link> <comments>http://www.ghacks.net/2010/07/18/how-to-uninstall-software-in-windows-safe-mode/#comments</comments> <pubDate>Sun, 18 Jul 2010 10:40:50 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[Software]]></category> <category><![CDATA[Windows]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[safe mode]]></category> <category><![CDATA[uninstall software]]></category> <category><![CDATA[windows installer]]></category> <category><![CDATA[windows registry]]></category> <category><![CDATA[windows safe mode]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=28368</guid> <description><![CDATA[Safe Mode in Windows loads the operating system in a limited state, which can be helpful for troubleshooting and correcting PC issues. Many of the standard services and features of the Windows operating system are not available in safe mode, including the Windows Installer Service. It is not possible to uninstall software in Safe Mode [...]]]></description> <content:encoded><![CDATA[<p>Safe Mode in Windows loads the operating system in a limited state, which can be helpful for troubleshooting and correcting PC issues. Many of the standard services and features of the Windows operating system are not available in safe mode, including the Windows Installer Service.</p><p>It is not possible to uninstall software in Safe Mode if the service is not running, that is highly problematic if a software is responsible for PC issues.</p><p>There is however an option to start the Windows Installer Service in Safe Mode, so that software can be uninstalled afterwards.</p><p><span
id="more-28368"></span><div
id="attachment_28369" class="wp-caption alignnone" style="width: 379px"><img
src="http://www.ghacks.net/wp-content/uploads/2010/07/windows_installer_service.png" alt="windows installer service" title="windows installer service" width="369" height="222" class="size-full wp-image-28369" /><p
class="wp-caption-text">windows installer service error</p></div></p><p>The Windows Installer Service can&#8217;t be started immediately, it is necessary to patch the Registry first.</p><p>Open the Windows Registry Editor with the keyboard combination Windows-R, type regedit and hit enter. It can also be launched by clicking on the start orb, and entering regedit in the run box in the Start Menu followed by enter.</p><p>Locate the following Registry key</p><p><code>HKLM&#92;SYSTEM&#92;CurrentControlSet&#92;Control&#92;SafeBoot&#92;Minimal&#92;</code></p><p>Right-click on Minimal and select New > Key. Name the key MSIService and change the default value to Service by double-clicking it.</p><div
id="attachment_28370" class="wp-caption alignnone" style="width: 510px"><img
src="http://www.ghacks.net/wp-content/uploads/2010/07/windows-safe-mode-500x174.png" alt="windows safe mode" title="windows safe mode" width="500" height="174" class="size-medium wp-image-28370" /><p
class="wp-caption-text">windows safe mode</p></div><p>This makes the Windows Installer Service available in minimal Safe Mode. You may want to repeat the steps for the networking Safe Mode as well. All steps are the same, except for the starting Registry key.</p><p><code>HKLM&#92;SYSTEM#92;CurrentControlSet&#92;Control&#92;SafeBoot&#92;Network&#92;</code></p><p>The Windows Installer Service needs to be started afterwards, this can be done by clicking on the start orb again, entering services.msc and hitting enter.</p><p>Locate Windows Installer in the services listing, right-click it and select start. Alternatively execute the following command via the command line:</p><p><code>net start msiserver</code></p><p>It is furthermore possible to issue all commands via the command line. To enable Windows Installer in minimal Safe Mode execute the following command:</p><p><code>REG ADD "HKLM&#92;SYSTEM&#92;CurrentControlSet&#92;Control&#92;SafeBoot&#92;Minimal&#92;MSIServer" /VE /T REG_SZ /F /D "Service"<br
/> </code></p><p>For Safe Mode with network:</p><p><code>REG ADD "HKLM&#92;SYSTEM&#92;CurrentControlSet&#92;Control&#92;SafeBoot&#92;Network&#92;MSIServer" /VE /T REG_SZ /F /D "Service"<br
/> </code></p><p>The freeware <a
href="http://www.windowsitpro.com/article/tips/jsi-tip-9233-safemsi-exe-freeware-starts-windows-installer-in-safe-mode-.aspx">SafeMSI</a> offers to automate the Registry editing and service starting. Just double-click the program in Safe Mode to enable Windows Installer.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/07/18/how-to-uninstall-software-in-windows-safe-mode/feed/</wfw:commentRss> <slash:comments>1</slash:comments> </item> <item><title>Add these handy bash aliases for efficiency</title><link>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/</link> <comments>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/#comments</comments> <pubDate>Mon, 05 Jul 2010 18:53:35 +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[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[rpm secure shell]]></category> <category><![CDATA[ssh]]></category> <category><![CDATA[sudo]]></category> <category><![CDATA[update]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=27942</guid> <description><![CDATA[&#8220;In the beginning was the command line&#8221; is not the just name of a great book by Neil Stephensen (read the text here), but a way of life for many Linux users. The command line is the tool for just about any level user. However, the power user takes the command line to newer and [...]]]></description> <content:encoded><![CDATA[<p>&#8220;In the beginning was the command line&#8221; is not the just name of a great book by Neil Stephensen (read the text <a
title="In the beginning was the command line" href="http://www.cryptonomicon.com/beginning.html" target="_blank">here</a>), but a way of life for many Linux users. The command line is <em>the</em> tool for just about any level user. However, the power user takes the command line to newer and many different heights and does so in many different ways.</p><p>One of those ways is with the help of bash aliases. A bash alias is a way to create shortcuts to commands that would normally take a lot of typing or are a challenge to remember. So instead of <em>ssh -v -l jlwallen 192.168.1.10 </em>I could enter just<em> desktop </em>or whatever I want that shortcut to be. In that vein, I am going to offer up some very handy shortcuts for you to add to make your command line usage more efficient.</p><p><span
id="more-27942"></span><strong>Where they go</strong></p><p><strong></strong>If you open up a terminal and issue the command <em>ls -a |less</em> you should come across a file called <strong>~/.bashrc</strong>. This file is very powerful and handles a LOT of tasks. One such task is that of aliases. Within that file you will find the section:</p><p><em># Alias definintions</em></p><p>This is where you put your user-created aliases&#8230;and where we will place the aliases listed below. Once you create the aliases, you will notice they don&#8217;t work within the same terminal you used to add them with your text editor. You have to fire up a new terminal to make sure they work. Because of this, always leave your original terminal open to make sure the new terminal will still work. I have witnessed a user fubar their bash such that the terminal would no longer open. So use caution when randomly closing your terminals. Now, on the aliases.</p><p><strong>Ask before you remove</strong></p><p>Admit it, you&#8217;ve accidentally deleted a file that could have been prevented if you had used the -<em>i </em>switch with the <em>rm</em> command. To avoid this common mistake, let&#8217;s add an alias such that any time the <em>rm</em> command is issued, it is done with the <em>-i</em> switch. This alias would look like:</p><p><em>alias rm=&#8221;rm -i&#8221;</em></p><p><strong>Secure shell</strong></p><p>As I mentioned earlier, secure shell&#8217;ing to a machine can be a real pain when you do it over and over. Create an alias like so:</p><p><em>alias server1=&#8221;ssh -v -l USER ADDRESS&#8221;</em></p><p>Where USER is the user name you would log in with and ADDRESS is the address of the machine you are remoting into.</p><p><strong>Bookmark alias</strong></p><p>Here&#8217;s a fun one. You can open up your browser to a specific bookmark, from the command line with an alias like so:</p><p><em>alias ghacks=&#8221;chromium-browser http://www.ghacks.net&#8221;</em></p><p>Of course you would replace <em>chromium-browser </em>with your default browser and the URL with the address you want the browser to open up to.</p><p><strong>RPM batch installation</strong></p><p>Say you do a lot of batch installations of RPMS. And say you always save your RPM files to <strong>~/RPMS</strong>. You can add an alias to quickly install those RPMS like so:</p><p><em>alias brpm=&#8221;rpm -ivh ~/RPMS/*rpm&#8221;</em></p><p><strong>Update/upgrade with apt</strong></p><p>Instead of having to issue both command for updating apt and upgrading your installation, combine them into one easy to use alias like so:</p><p><em>alias update=&#8221;sudo apt-get update ; sudo apt-get upgrade&#8221;</em></p><p>You will have to enter your sudo password once and the update/upgrade will take place.</p><p><strong>Final thoughts</strong></p><p>Bash aliases are only limited to your imagination. After you spend enough time with the command line you will see that these aliases can really make your day to day Linux life much easier.</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/07/05/add-these-handy-bash-aliases-for-efficiency/feed/</wfw:commentRss> <slash:comments>3</slash:comments> </item> <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>Guake: Hide-able terminal goodness</title><link>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/</link> <comments>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/#comments</comments> <pubDate>Mon, 21 Jun 2010 11:19:21 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[bash]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[GNOME]]></category> <category><![CDATA[linux command line]]></category> <category><![CDATA[terminal]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=26885</guid> <description><![CDATA[As you well know, I am a big fan of the Linux command line. Because of this I use the terminal a lot. I am also a fan of Linux eye candy and making my desktop as clean and sleek as possible. I don&#8217;t like to have things in the way and I like easy [...]]]></description> <content:encoded><![CDATA[<p>As you well know, I am a big fan of the Linux command line. Because of this I use the terminal a lot. I am also a fan of Linux eye candy and making my desktop as clean and sleek as possible. I don&#8217;t like to have things in the way and I like easy access to the tools I use. That is why I want my terminal to be easily accessed, always ready, and quick to disappear.</p><p>Guake is a drop-down terminal that fits all of these needs perfectly. It&#8217;s for the GNOME environment and is easy to use and is one of those tools that, once you start using, you&#8217;ll wonder why you hadn&#8217;t been using all along. In this article I will show you how to install and use the Guake drop-down terminal so your Linux command line can be as finger-tip ready as possible.</p><p><span
id="more-26885"></span><strong>Installation</strong></p><p>Fortunately the installation of Guake is simple. Because it lives in the standard repositories of all of the major distributions, you can install Guake with a command like this:</p><p><em>yum install guake</em></p><p><em><span
style="font-style: normal">or</span></em></p><p><em>sudo apt-get install guake</em></p><div
id="attachment_26886" class="wp-caption alignleft" style="width: 435px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_icon.png"><img
class="size-full wp-image-26886" src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_icon.png" alt="" width="425" height="48" /></a><p
class="wp-caption-text">Figure 1</p></div><p>If you use the former command you will have to do so after you<em> su</em> to the root user. Once installed you will need to start Guake. You do so by clicking <strong>Applications &gt; Acesssories &gt; Guake Terminal</strong>. Once started Guake will reside in your notification area as an icon (see Figure 1). The icon is the Green downward pointing arrow. If you right-click that icon can access the Guake preferences.</p><p><strong>Configuration</strong></p><p><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_prefs.png"><img
class="alignright size-full wp-image-26887" src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_prefs.png" alt="" width="209" height="244" /></a>There isn&#8217;t too much to configure with Guake. From the preferences window you can take care of such items as:</p><ul><li>The default shell: You will most likely want to stick with the default here.</li><li>Main window height: How tall do you want Guake when it is opened?</li><li>Appearance: Text color/font, background color/transparency/image.</li><li>Various keyboard shortcuts</li></ul><p>By default Guake is not set to start up on login. One of the surprises that always catches me with Guake is you can not set this through the properties window. Instead you will have to set this through the GNOME Start up Applications tool. Access this by clicking <strong>System &gt; Preferences &gt; Startup Applications.</strong> When this window is open scroll down until you find the Guake entry, click the Guake checkbox, and click Close. Now Guake will start up when you log in.</p><p><strong>Usage</strong></p><div
id="attachment_26888" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/06/guake_open.png"><img
class="size-medium wp-image-26888 " src="http://www.ghacks.net/wp-content/uploads/2010/06/guake_open-500x281.png" alt="" width="300" height="169" /></a><p
class="wp-caption-text">Figure 3</p></div><p>To use Guake you simply click the keyboard shortcut configured in the Preferences window. By default that key is F12.  When you click the Open key Guake will drop down for you to use. Figure 3 shows Guake in action, running the top command. By default Guake will remain above all other windows until you dismiss it (by clicking the same key you did to open it).</p><p>You can use Guake as you would a normal terminal window. And, like most good modern terminals, you can have multiple tabs open. To open a new tab in Guake, by default, you higt &lt;Ctrl&gt;&lt;Shift&gt;t.</p><p>If you want to know other handy keyboard shortcuts, go back to the Preferences window and look at the Keyboard shortcuts tab.</p><p><strong>Final thoughts</strong></p><p>If you frequently use the command line, you will very much be glad you have found Guake. With a terminal window so accessible, your work will be that much more efficient. And we all know efficiency is a key factor in every day computing (at least for many of us).</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/06/21/guake-hide-able-terminal-goodness/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>Using netstat</title><link>http://www.ghacks.net/2010/04/20/using-netstat/</link> <comments>http://www.ghacks.net/2010/04/20/using-netstat/#comments</comments> <pubDate>Tue, 20 Apr 2010 11:10:16 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Advice]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Networks]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[Software]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[netstat]]></category> <category><![CDATA[network commands]]></category> <category><![CDATA[network information]]></category> <category><![CDATA[tcp]]></category> <category><![CDATA[udp]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=24731</guid> <description><![CDATA[As promised (in my article &#8220;How do I find my network information in Linux?&#8220;) I am going to introduce you to the netstat command. This command is a very useful tool for discovering networking information such as routing tables, network connections, interface statistics, masquerade connections, and multicast memberships. But it&#8217;s not quite as simple to [...]]]></description> <content:encoded><![CDATA[<p>As promised (in my article &#8220;<a
title="How do I find my network information in Linux?" href="http://www.ghacks.net/2010/04/20/using-netstat/" target="_blank">How do I find my network information in Linux?</a>&#8220;) I am going to introduce you to the netstat command. This command is a very useful tool for discovering networking information such as routing tables, network connections, interface statistics, masquerade connections, and multicast memberships. But it&#8217;s not quite as simple to use as some of of the other &#8220;discovery&#8221; tools (such as ifconfig). With netstat you really do need to know what you&#8217;re looking for and how to find it. This article will help you to understand just that.</p><p><span
id="more-24731"></span><strong>Installation?</strong></p><p>Fortunately your distribution should come with the <em>netstat</em> command pre-installed. To check this, open up a terminal window (that&#8217;s where you will use netstat anyway) and issue the command <em>which netsat</em>. This command should return something like <em>/bin/netstat</em>. That will tell you that the tool is installed and where the executable is.</p><p><strong>Usage</strong></p><p>Because netstat offers such a variety of options, it might be best if I first list some of the more useful options.</p><p><strong>a</strong>: Shows the state of all sockets and routing table entries.</p><p><strong>c</strong>: Display information continuously.</p><p><strong>d</strong>: Show the state of all interfaces that use DHCP.</p><p><strong>e</strong>: Show extended information.</p><p><strong>g</strong>: Show the multicast group membership information for both IPv4 and IPv6.</p><p><strong>i</strong>: Display a table of all network inferfaces.</p><p><strong>l</strong>: Limit statistics to a defined interface.</p><p><strong>M</strong>: Show multicast routing tables.</p><p><strong>n</strong>: Shows network addresses as numbers instead of the default symbols.</p><p><strong>p</strong>: Show address resolution tables.</p><p><strong>P</strong>: Limit statistics to a defined protocol.</p><p><strong>r</strong>: Show all routing tables.</p><p><strong>t</strong>: Show TCP connections.</p><p><strong>u</strong>: Show UDP connections.</p><p><strong>v</strong>: Use verbose mode for output.</p><p>So let&#8217;s take a look and see how these can be used together.</p><p><strong>netstat</strong></p><p>By itself (no options) this command prints out generic statistics of the host you are currently connected to.</p><p><strong>netstat -an</strong></p><p>This command will display all connections to the host, including source and destination addresses and ports, and displays them as numbers.</p><p><strong>netstat -rn</strong></p><p>This command will display the routing table for the host in numeric form.</p><p><strong>netstat -r</strong></p><p>This command will display your routing table for your host.</p><p><strong>netstat -natp</strong></p><p>This command will display active TCP connections in numerical form.</p><p><strong>netstat -t &#8211;listening</strong></p><p>This will show you all tcp ports you host is listening on.</p><p><strong> </strong></p><p><strong></p><div
id="attachment_24733" class="wp-caption alignleft" style="width: 310px"><a
href="http://www.ghacks.net/wp-content/uploads/2010/04/netstat_output.png"><img
class="size-medium wp-image-24733 " src="http://www.ghacks.net/wp-content/uploads/2010/04/netstat_output-500x351.png" alt="" width="300" height="211" /></a><p
class="wp-caption-text">Figure 1</p></div><p>netstat &#8211;statistics</strong></p><p>This command will display various statistics for your host&#8217;s interfaces. Note that this command will display a LOT of statistics. A snippet of the output will look like that shown in Figure 1.</p><p>As you can see, this command will display quite a bit of information. On top of that you might need to pipe this command through the <em>less </em>command in order to see it more easily. That full command would look like <em>netstat &#8211;statistics | less. </em>Using it that way would allow you to use your arrow keys to scroll up and down through the ouput.</p><p><strong>Final thoughts</strong></p><p>Although not an exhaustive look at the netstat command, this will get you started and using this handy tool. Since there are so many switches and options to use with netstat, in order to cover them all, take a look at the netstat man page (issue the command <em>man netstat</em>) where you can see each and every switch explained.</p><p>﻿﻿</p><p><strong><br
/> </strong></p><p><strong><br
/> </strong></p><p><strong><br
/> </strong></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2010/04/20/using-netstat/feed/</wfw:commentRss> <slash:comments>5</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> </channel> </rss>
