<?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; cli</title> <atom:link href="http://www.ghacks.net/tag/cli/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 13:29:21 +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>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>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>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>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>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> <item><title>Tweet from the command line with Twidge</title><link>http://www.ghacks.net/2009/11/13/tweet-from-the-command-line-with-twidge/</link> <comments>http://www.ghacks.net/2009/11/13/tweet-from-the-command-line-with-twidge/#comments</comments> <pubDate>Fri, 13 Nov 2009 16:19:20 +0000</pubDate> <dc:creator>Jack Wallen</dc:creator> <category><![CDATA[Desktop Manager]]></category> <category><![CDATA[Linux]]></category> <category><![CDATA[Online Services]]></category> <category><![CDATA[Open Source]]></category> <category><![CDATA[The Web]]></category> <category><![CDATA[Tutorials Basic]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[tweet]]></category> <category><![CDATA[twitter]]></category> <guid
isPermaLink="false">http://www.ghacks.net/?p=18472</guid> <description><![CDATA[For the longest time I refused to see the value in Twitter. Over the last six months I have changed my tune on that. Now I use Twitter primarily as a PR tool for my articles. And since my renewed belief in micro-blogging, I have found plenty of tools with which to enact with Twitter. [...]]]></description> <content:encoded><![CDATA[<p>For the longest time I refused to see the value in Twitter. Over the last six months I have changed my tune on that. Now I use Twitter primarily as a PR tool for my articles. And since my renewed belief in micro-blogging, I have found plenty of tools with which to enact with Twitter.</p><p>One tool I have found to be the least invasive is Twidge. Twidge does not have an application or daemon running in the background. Twidge does not have a panel applet. Twidge doesn&#8217;t even remain open in the terminal window. Twidge just allows you to enter commands that take specific action on your Twitter account. It&#8217;s simple, it&#8217;s fast, and it&#8217;s&#8230;well&#8230;command line fu-tastic! With that said, let&#8217;s install, configure, and use Twidge.</p><p><span
id="more-18472"></span><strong></strong></p><p><strong>Features</strong></p><p>The first thing you need to know is if Twidge offers enough features to convince you to use it. Here is the short list:</p><ul><li>Simple to use.</li><li>View activity of friends.</li><li>Add followers.</li><li>Follow users.</li><li>Archiving of your tweets.</li><li>Automatic URL shortening via tinyurl.com.</li></ul><p>And much more.</p><p><strong>Installation</strong></p><p>As you would expect, twidge can be found in your distribution repositories. So all you need to do is open up a terminal and issue a command like:</p><p><em>sudo apt-get install twidge</em></p><p>or</p><p><em>yum install twidge</em></p><p>or</p><p><em>urpmi twidge </em></p><p>The installation will pick up the curl dependency automatically. After Twidge is installed, keep that terminal open because you&#8217;ll need it (at least to begin with).</p><p><strong>Configuration</strong></p><p>In order to use Twidge you have to configure it to authenticate to your account. To do this you have to run a built-in configuration script issued from the command line. Issue the command:</p><p><em>twidge setup</em></p><p>You will be asked two simple questions:</p><ul><li>Your use(r)name.</li><li>Your password.</li></ul><p>That&#8217;s it. Now you are ready to start using Twidge.</p><p><strong>Usage</strong></p><p>The basic usage of Twidge is:</p><p><em>twidge update &#8216;STATUS&#8217;</em></p><p>Where STATUS is what you want to post to twitter (between single quotes).</p><p>Of course updating is not always enough. Twidge has a number of built-in tools. Let&#8217;s take a look at what they are. NOTE: The basic usage of these tools is:</p><p><em>twidge TOOL OPTIONS</em></p><p>Where <em>TOOL </em>is the tool you want to use and <em>OPTIONS </em>are any options you want to pass to the tool (if any options are available).</p><p>Display updates.</p><ul><li>lsarchive: List your own posts.</li><li>lsdm: List direct messages sent to you.</li><li>lsdmarchive: List direct messages you have sent.</li><li>lsrecent: Lists recent posts made by you or those you follow.</li><li>lsreplies: Lists all recent replies made to you.</li><li>lsfollowers: Lists those following you.</li><li>lsfollowing: Lists those you are following.</li></ul><p>Action commands.</p><p>All of these tools are used in the same way the tools above are used, except in certain instances you proceed the tool name with username like so:</p><p><em>twidge TOOL USERNAME</em></p><p>Where TOOL is the specific tool you want to use and USERNAME is the user you want to send the information to.</p><ul><li>dmsend: Send a direct to a user.</li><li>follow: Follow a specific user.</li><li>unfollow: Stop following a user.</li><li>update: Update your status.</li></ul><p>So let&#8217;s say you want to update your status to say &#8220;Hey everyone, I am reading a cool article on Ghacks right now!&#8221;. To do this you would enter the command:</p><p><em>twidge update &#8216;Hey everyone, I am reading a cool article on Ghacks right now!&#8217;</em></p><p>and hit enter when you&#8217;re done.</p><p>Let&#8217;s say, however, you wanted to use <em>I&#8217;m </em>instead of <em>I am. </em>The use of a single quote in the middle of that tweet would cause an error. To get around that just enter:</p><p><em>twidge update</em></p><p>and then hit enter. You should notice that you do not get your bash prompt back. What you do now is type in your tweet, without using quotes, and then hit enter. This way you can use contractions without having to worry about proper shell quotes.</p><p><strong>Using twidge without command line</strong></p><p>Although Twidge is a command line only tool, you can get around opening up a terminal by opening up your desktop&#8217;s run dialog and then entering your twidge command there. If you&#8217;re using GNOME you hit &lt;Alt&gt;F2 and then enter the Twidge command in the run dialog. This keeps you from having to have yet another window open, and it&#8217;s much faster.</p><p><strong>Final thoughts</strong></p><p>I will make no bones about the fact that Twidge is not nearly as simple as the standard GUI-based tool. But Twidge makes up for that with speed, reliability, and flexibility. Because of its command line nature, you could even create a nifty bash script to use something like <em>fortune </em>and then add that bash script to a cron job so you would get an automatically updated status. Script-fu-tastic!</p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2009/11/13/tweet-from-the-command-line-with-twidge/feed/</wfw:commentRss> <slash:comments>4</slash:comments> </item> <item><title>YubNub a social internet command line</title><link>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/</link> <comments>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/#comments</comments> <pubDate>Tue, 16 Jan 2007 17:28:08 +0000</pubDate> <dc:creator>Martin Brinkmann</dc:creator> <category><![CDATA[The Web]]></category> <category><![CDATA[cli]]></category> <category><![CDATA[cmd]]></category> <category><![CDATA[command-line]]></category> <category><![CDATA[internet]]></category> <category><![CDATA[ls]]></category> <category><![CDATA[social-command-line]]></category> <category><![CDATA[yubnub]]></category> <guid
isPermaLink="false">http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/</guid> <description><![CDATA[The first time I saw the yubnub website I was thinking that no one would need this website at all but after some testing it became clear that it offers an easy way to access many services very fast without depending on bookmarks or links. If you do work with the command line in Windows or Linux you feel right at home, you enter a command and some parameters and yubnub does the rest.]]></description> <content:encoded><![CDATA[<p>The first time I saw the <a
target="_blank" title="yubnub" href="http://yubnub.org/">yubnub</a> website I was thinking that no one would need this website at all but after some testing it became clear that it offers an easy way to access many services very fast without depending on bookmarks or links. If you do work with the command line in Windows or Linux you feel right at home, you enter a command and some parameters and yubnub does the rest.</p><p>A <a
target="_blank" title="yubnub commands" href="http://yubnub.org/kernel/ls?args=">list of commands</a> is accessible by entering ls into the form field. I think an example will illustrate the strength of yubnub; wp ghacks searches wikipedia for the term ghacks, gim ghacks searches google images for ghacks. y or g searches yahoo or google for a selected search term. That is not all of course. AM title searches amazon for the title that you enter, random 1000 returns a random number between 1 and 1000.</p><p><span
id="more-1107"></span>A good selection of commands that should be useful for most users are Jeremy&#8217;s Picks which displays a list of about 100 commands. It is possible to create your own commands. You do select a command string that is not used yet and select a url that uses variables to perform searches or operations. One example would be <span
class="hint"> <a
title="Linkification: http://images.google.com/images?q=%s" class="linkification-ext" href="http://images.google.com/images?q=%s">http://images.google.com/images?q=%s</a> which is simply the search string for google images. </span></p><p><span
class="hint">The search string that is entered is substituted with %s in this example. It is possible to create more advanced searches  with more than one parameters.</span></p> ]]></content:encoded> <wfw:commentRss>http://www.ghacks.net/2007/01/16/yubnub-a-social-internet-command-line/feed/</wfw:commentRss> <slash:comments>2</slash:comments> </item> </channel> </rss>
