<?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>MakeUseOf &#187; commands</title>
	<atom:link href="http://www.makeuseof.com/tags/commands/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.makeuseof.com</link>
	<description>Cool Websites, Software and Internet Tips</description>
	<lastBuildDate>Fri, 10 Feb 2012 15:30:58 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How To Control Running Services With The SC Command [Windows]</title>
		<link>http://www.makeuseof.com/tag/control-running-services-sr-command-windows/</link>
		<comments>http://www.makeuseof.com/tag/control-running-services-sr-command-windows/#comments</comments>
		<pubDate>Wed, 04 Jan 2012 22:31:54 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[administration]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[pc maintenance]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[system monitor]]></category>
		<category><![CDATA[system tools]]></category>
		<category><![CDATA[troubleshoot]]></category>
		<category><![CDATA[windows processes]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=95838</guid>
		<description><![CDATA[One of the things that I find myself doing much more often since diving into IT is monitoring and checking the status of services running on computers that are running across the company. There is the standard way of managing services which most people use because it's well-known and fairly easy. But what about another way?]]></description>
			<content:encoded><![CDATA[<p><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/computercode.png?323f2c" alt="services in computer" />One of the things that I find myself doing much more often since diving into IT is monitoring and checking the status of services running in computers across the company.</p>
<p>There is the standard way of managing services which most people use because it&#8217;s well-known and fairly easy. This involves going into Administrative controls or going into the control panel, hunting down the Services utility and doing what you need to do.</p>
<p>If you want to manage the services that are running on a different computer or server on your network, you need to go to computer management, connect to the remote machine, and then manage those services.</p>
<p>There&#8217;s nothing at all wrong with taking this approach &#8211; in fact system administrators everywhere use these standard Windows utilities to manage the infrastructure across the enterprise. But, what if you could monitor, stop and start services by typing in a single line at the command prompt?</p>
<h2>Controlling Services From the Command Line</h2>
<p>You may need to stop services running in a client computer so that you can reinstall some software. Or maybe you need to restart services that are running on a server because some software isn&#8217;t working properly.</p>
<p>Up until now, you&#8217;ve probably managed services on client machines running on your network using the standard services utility. This is the Services tool that you launch in the <em>Administrative Tools</em> section of the control panel.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/services1.png?323f2c" alt="services in computer" width="523" height="398" /></p>
<p>In Admin Tools, you can either go directly to the Services tool, or open up computer management if you want to access a different computer on your network.</p>
<p style="text-align: center;"><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/services2.png?323f2c" alt="running services windows" width="427" height="363" /></p>
<p>To access a different computer, just click action, &#8220;<em>Connect to Another Computer</em>&#8221; and then type the network name of the computer.</p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/services3.png?323f2c" alt="running services windows" width="564" height="373" /></p>
<p>Then you can open up the services tool.</p>
<h3>An Easier Way To Manage Services</h3>
<p>So anyway, that&#8217;s the long way. The shorter and faster way is to use the command &#8220;SC&#8221;.</p>
<p>You&#8217;re probably familiar with the NET command. The SC command is nearly identical to NET, except that it can also create a service, in addition to monitoring, stopping and starting them. Best of all, you can issue the SC command against other computers over the network (assuming you have admin rights).</p>
<p>Doing an SC query against a computer will give you all of the installed services and whether they are running. When you issue the command <em>&#8220;SC \\**computer-name** query |more&#8221;</em> &#8211; you&#8217;ll get an output as shown here.</p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc11.png?323f2c" alt="running services windows" width="574" height="502" /></p>
<p>As you can see, this gives you the state of the service, the type of service and other parameters. For the sake of our exercises here, we&#8217;re going to pay attention to just the state of the services.</p>
<p>If you want to list only the services that are currently not running (stopped), then you would issue the command, <em>&#8220;SC \\**computer-name** query state= &#8220;inactive&#8221; |more&#8221;</em></p>
<p>The |more part of the command makes the output pause on each screen so that you can scroll.</p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc21.png?323f2c" alt="services running on computer" width="577" height="500" /></p>
<p>As you can see, those services are all stopped. Now, instead of having to dig through all of those services, if you know the name of the service, you can just issue the command <em>&#8220;SC \\**computer-name** query **service-name**&#8221;</em></p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc31.png?323f2c" alt="services running on computer" width="578" height="145" /></p>
<p>That will report back with the current status of just that service and nothing else. To remotely stop a service, all you have to do is issue the stop command, <em>&#8220;SC \\**computer-name** stop **service-name**&#8221;</em></p>
<p><img src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc41.png?323f2c" alt="services running on computer" width="579" height="156" /></p>
<p>The output will show a state of &#8220;STOP-PENDING&#8221;, but after a few moments, if you query that service again, you&#8217;ll see that it is no longer running. You can start it by issuing the same command, but replacing &#8220;stop&#8221; with &#8220;start&#8221;.</p>
<h3>Creating A Script To Query, Stop Or Start Any Service</h3>
<p>Okay, so now that you&#8217;ve got the basics down, it&#8217;s time to write a script that will stop any service that you want without the need to remember the exact command string. We can do this by writing a trusty Windows Script, as follows.</p>

<div class="wp_syntax"><div class="code"><pre class="vb" style="font-family:monospace;">&lt;script <span style="color: #151B8D; font-weight: bold;">type</span>=<span style="color: #800000;">&quot;text/javascript&quot;</span> language=<span style="color: #800000;">&quot;VBScript&quot;</span>&gt;// &lt;![CDATA[
   <span style="color: #E56717; font-weight: bold;">Option</span> <span style="color: #E56717; font-weight: bold;">Explicit</span> <span style="color: #151B8D; font-weight: bold;">On</span> <span style="color: #151B8D; font-weight: bold;">Error</span> <span style="color: #151B8D; font-weight: bold;">Resume</span> <span style="color: #8D38C9; font-weight: bold;">Next</span> <span style="color: #151B8D; font-weight: bold;">Dim</span> WshShell <span style="color: #151B8D; font-weight: bold;">Dim</span> strInput <span style="color: #151B8D; font-weight: bold;">Dim</span> strComputer <span style="color: #151B8D; font-weight: bold;">Dim</span> x <span style="color: #151B8D; font-weight: bold;">Dim</span> blnGetList <span style="color: #151B8D; font-weight: bold;">Dim</span> strStopStart <span style="color: #151B8D; font-weight: bold;">set</span> WshShell=<span style="color: #E56717; font-weight: bold;">CreateObject</span>(<span style="color: #800000;">&quot;WScript.Shell&quot;</span>) x=0 strComputer = InputBox(<span style="color: #800000;">&quot;Enter the computer or server name:&quot;</span>) <span style="color: #8D38C9; font-weight: bold;">Do</span> <span style="color: #8D38C9; font-weight: bold;">while</span> x=0    <span style="color: #008000;">'Query User for Service to check    strInput = InputBox(&quot;Enter the service name or DONE:&quot;)    If strInput = &quot;DONE&quot; or strInput = &quot;done&quot; then 	x=1    Else 	strStopStart = MsgBox(&quot;Stop Service? Yes-Stop, No-Start&quot;, VBYesNo, &quot;Stop Request&quot;)        'Send commands 	IF strStopStart = vbYes then       	    WshShell.run &quot;cmd.exe&quot;             WScript.Sleep 1000             WshShell.SendKeys &quot;sc \\&quot; &amp;#038; strComputer &amp;#038; &quot; stop &quot; &amp;#038; strInput &amp;#038; &quot; &gt;&gt; c:\temp\results.txt&quot;
</span>            WshShell.SendKeys (<span style="color: #800000;">&quot;{Enter}&quot;</span>)
            WScript.Sleep 1000
            WshShell.SendKeys <span style="color: #800000;">&quot;exit&quot;</span>
            WshShell.SendKeys (<span style="color: #800000;">&quot;{Enter}&quot;</span>)
&nbsp;
         <span style="color: #8D38C9; font-weight: bold;">Else</span>
&nbsp;
      	    WshShell.run <span style="color: #800000;">&quot;cmd.exe&quot;</span>
            WScript.Sleep 1000
&nbsp;
            WshShell.SendKeys <span style="color: #800000;">&quot;sc \\&quot;</span> &amp;#038; strComputer &amp;#038; <span style="color: #800000;">&quot; start &quot;</span> &amp;#038; strInput &amp;#038; <span style="color: #800000;">&quot; &gt;&gt; c:\temp\results.txt&quot;</span>
            WshShell.SendKeys (<span style="color: #800000;">&quot;{Enter}&quot;</span>)
            WScript.Sleep 1000
            WshShell.SendKeys <span style="color: #800000;">&quot;exit&quot;</span>
            WshShell.SendKeys (<span style="color: #800000;">&quot;{Enter}&quot;</span>)
	 <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span> 
&nbsp;
  <span style="color: #8D38C9; font-weight: bold;">End</span> <span style="color: #8D38C9; font-weight: bold;">If</span>
&nbsp;
<span style="color: #8D38C9; font-weight: bold;">Loop</span>
&nbsp;
WScript.Quit
// ]]&gt;&lt;/script&gt;</pre></div></div>

<p>When you run this script, it&#8217;ll ask you for the name of the service that you want to stop or start.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc5.png?323f2c" alt="services running on computer" width="363" height="160" /></p>
<p>And then whether you want to stop or start the service.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc7.png?323f2c" alt="" width="188" height="107" /></p>
<p>Using the <em>&#8220;&gt;&gt; c:\temp\results.txt&#8221;</em> command, it outputs the stop and start results and errors to a text file that you can use to see whether the command worked.</p>
<p>When I ran the script above, I followed it up with a quick query of the service before and after running the script.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/12/sc8.png?323f2c" alt="services in computer" width="576" height="278" /></p>
<p>As you can see, the service I stopped &#8211; helpsvc &#8211; was running. I ran the Windows Script to stop it, queried it, and it was stopped.</p>
<p>If you wanted to get really fancy, you could add a section to the script that outputted all of the currently installed services on the PC to a text file that you could review before deciding which service to stop or start. The command for that would be <em>&#8220;sc \\&#8221; &amp; strComputer &amp; &#8221; query &gt; c:\temp\services.txt&#8221;.</em></p>
<p>As you can see, the SC command can be a pretty powerful and efficient way to manage services on any computer, and if you have some talent with Windows Scripting, you can even automate the process to make your job even easier.</p>
<p>Do you think the SC command could come in handy for you? What about an automated script that runs the command? Share your ideas and thoughts in the comments section below.</p>
<p><small>Image Credit: <a href="http://image.shutterstock.com/display_pic_with_logo/298498/298498,1281943813,1/stock-photo-code-of-php-language-programming-on-blue-59109898.jpg" rel="nofollow">Shutterstock</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/control-running-services-sr-command-windows/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Put Your Command Line On Steroids With Swiss File Knife [Windows]</title>
		<link>http://www.makeuseof.com/tag/put-command-line-steroids-swiss-file-knife/</link>
		<comments>http://www.makeuseof.com/tag/put-command-line-steroids-swiss-file-knife/#comments</comments>
		<pubDate>Fri, 02 Dec 2011 16:00:25 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[productivity]]></category>
		<category><![CDATA[scripts]]></category>
		<category><![CDATA[system tools]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=92749</guid>
		<description><![CDATA[Sometimes, the fastest way to accomplish a task such as sorting files or editing text documents is to use quick command line tools. there is a really cool tool called Swiss File Knife (sfk), which extends the sort of scripting set we've all become accustomed to.]]></description>
			<content:encoded><![CDATA[<p><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfkicon.png?323f2c" alt="command line programming" />Sometimes, the fastest way to accomplish a task such as sorting files or editing text documents is to use quick command line tools.</p>
<p>If you&#8217;ve followed my recent scripting articles, then you know that  I really like command line programming. I use <a href="http://www.makeuseof.com/tag/3-awesome-windows-scripting/">Windows Scripting</a>, but lots of readers still use the old batch jobs, which still work well.</p>
<p>However, there is a really cool tool called <strong>Swiss File Knife (sfk)</strong>, which extends the sort of scripting set we&#8217;ve all become accustomed to.</p>
<p>The tool includes the usual command file functions that you may be used to, like mkdir, copy or list, but it extends your cmd powers with other amazing features like easily manipulating files, analyzing folders, and even higher level functions not usually associated with command line commands.</p>
<h2>Setting Up Swiss File Knife</h2>
<p>Setting up sfk on your computer is really easy. First, <a href="http://stahlworks.com/downloads.html">download sfk</a> and place the executable somewhere on your hard drive, and then edit the PATH in the environment variables so that the path where that file is located is included.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk1.png?323f2c" alt="command line programming" width="411" height="428" /></p>
<p>Reboot your computer, and then you&#8217;re ready to get started. There are loads of really <a href="http://stahlworks.com/dev/swiss-file-knife.html">cool commands</a> that you can kick off with sfk, but I wanted to touch on the ones that I liked the most.</p>
<p>One of the useful commands that come in handy when you&#8217;re trying to figure out what folders or directories are hogging all of your computer hard drive space is the <em>treesize</em> command.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk2.png?323f2c" alt="command line software" width="573" height="204" /></p>
<p>&#8220;sfk treesize [directory]&#8221; will run down through all subdirectories, showing you how many files each directory has and the total memory consumption.</p>
<p>At the bottom of the results, you&#8217;ll find the total statistics for the folder you launched the command against. You&#8217;ll see a total count of files, directories and memory usage.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk3.png?323f2c" alt="command line software" width="404" height="143" /></p>
<p>Another useful command for when you want to run a script that doesn&#8217;t allow for directories or files with spaces, is the sfk <em>deblank</em> command.</p>
<p>The command is used to target a file, directory, or all files within a directory. To remove spaces from all file names inside a directory, just type &#8220;sfk deblank [directory name]&#8220;.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk4.png?323f2c" alt="command line software" width="521" height="398" /></p>
<p>This will go through the entire directory and rename any file with a space in it, replacing spaces with the underscore character.</p>
<p>Getting into some of the more advanced features of sfk is the <em>snapto</em> command, which can take multiple text files and collect the contents into a single file. This is really useful for collecting a collection of log files all into one file.</p>
<p>The command for this is &#8220;sfk snapto=filename.txt&#8221;.  Filename.txt is the name of the output file where you want all of the combined text contents to output to.<br />
<img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk5.png?323f2c" alt="command line tools" width="569" height="426" /><br />
One of my favorite commands in sfk is the <em>httpserv</em> command. By simply navigating to a particular folder and typing &#8220;sfk httpserv&#8221;, you can instantly launch a simple web server, with that directory as the root web directory.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk7.png?323f2c" alt="command line tools" width="502" height="150" /></p>
<p>The command uses your computers current network IP address as the web host IP, so any other computer on the network can open up that directory by opening up a web browser and typing that IP into the address. This is a really cool way to instantly share out an HTML page you may be working on, or if you want to quickly show someone the contents of a folder over the network.<br />
<img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk81.png?323f2c" alt="" width="577" height="433" /><br />
While you might be tempted to use this to share out files, like pictures or movie files, it&#8217;s actually faster to launch a quick FTP server using my other favorite sfk command, <em>ftpserv</em>.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk9.png?323f2c" alt="command line tools" width="468" height="126" /></p>
<p>When you type &#8220;sfk ftpserv&#8221;, it will instantly launch an ftp service so that any user on your network can open up an FTP client and connect to that directory via FTP file transfer. Here is Filezilla connected to my laptop computer after I enabled the service on the laptop through the &#8220;sfk ftpserv&#8221; command.<br />
<img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/sfk10.png?323f2c" alt="command line programming" width="549" height="486" /><br />
These are just a few of the cool things you can do with sfk. If you load it onto a USB drive, just think of the powerful commands at your fingertips no matter what computer you are on. Plug in your USB stick and use sfk commands to launch and instant web service, or to quickly scan through a collection of documents, looking for specific words and joining together multiple files with just one or two quick command lines.</p>
<p>Swiss File Knife is the swiss army knife of command line programming tools, and it&#8217;ll make your life a whole lot easier. Give it a shot and let us know which commands you like best. Share your thoughts in the comments section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/put-command-line-steroids-swiss-file-knife/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>How To Edit Thousands of WordPress Posts With Just One SQL Command</title>
		<link>http://www.makeuseof.com/tag/edit-thousands-wordpress-posts-sql-command/</link>
		<comments>http://www.makeuseof.com/tag/edit-thousands-wordpress-posts-sql-command/#comments</comments>
		<pubDate>Fri, 25 Nov 2011 16:01:09 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Wordpress & Blogging]]></category>
		<category><![CDATA[blogging tips]]></category>
		<category><![CDATA[coding]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[web development]]></category>
		<category><![CDATA[webdesign]]></category>
		<category><![CDATA[webmaster tools]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=92411</guid>
		<description><![CDATA[Growing a blog takes years, and a whole lot of pain and struggle. Then there are the major transitions, when you realize that you have to make some major changes, and it's going to take a whole lot of work. There are a number of major changes I've had to make on my own blog, but one of the most difficult was that I had used a certain manual method to insert Google ads into my blog articles.]]></description>
			<content:encoded><![CDATA[<p><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/database.png?323f2c" alt="how to edit wordpress" />Owning and running a WordPress blog is a lot of fun, especially when you first get started. Designing the site or picking a cool theme, and writing up those first few posts in anticipation of the huge swarm of people that you&#8217;re certain are headed your way. It doesn&#8217;t take long for reality to hit, and before you know it you don&#8217;t like the theme, the visitor flow is no more than a trickle, and you realize that your web host doesn&#8217;t quite have the horsepower you need.</p>
<p>Growing a blog takes years, and a whole lot of pain and struggle &#8211; I&#8217;m sure Aibek would testify to that. Then there are the major transitions, when you realize that you have to make some major changes, and it&#8217;s going to take a whole lot of work.</p>
<p>There are a number of major changes I&#8217;ve had to make on my own blog, but one of the most difficult was due to the fact that I had used a certain manual method to insert Google adverts into my blog articles.</p>
<h2>Changing Posts With A Single SQL Command</h2>
<p>The problem is that after several years of running the blog, I had nearly 1,000 posts with that Google advert manually inserted. If I ever wanted to make a change, that&#8217;s a thousand posts I&#8217;d have to edit.</p>
<p>I wanted to use that cool <a href="http://www.makeuseof.com/tag/insert-template-wordpress-post-inpost-template/">in-post template add-on</a> that I wrote about in 2010.  This would automate the insertion of adverts moving forward, but if I used it without removing all of those existing adverts, I&#8217;d end up with two ads in the old articles.</p>
<p>To remove the old advert , I had to perform a little bit of SQL magic, and I&#8217;m going to share that with you today. The action takes place in phpMyAdmin, and you&#8217;ll need to select the database of your blog from the left menu.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove1.png?323f2c" alt="how to edit wordpress" width="579" height="377" /></p>
<p>The code that you&#8217;re going to use to strip sections of your content will be in the SQL tag. What I mean by that is the code I&#8217;m going to show you, you&#8217;ll be able to use to remove any content that exists on multiple blog posts, from 2 to 200 &#8211; or more. The only requirement is that what you want to remove has to have a common start text and an end text &#8211; like a Google advert has a common start tag and an end tag.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove2.png?323f2c" alt="wordpress edit page" width="557" height="376" /></p>
<p>This is what my newer blog entries look like, with the ad manually inserted right after the &#8220;more&#8221; tag on every page, aligned on the right.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove3.png?323f2c" alt="wordpress edit page" width="480" height="362" /></p>
<p>The way this code is laid out on the page looks like this:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove7.png?323f2c" alt="wordpress edit page" width="528" height="224" /></p>
<p>As you can see, I have a &#8220;script type&#8221; start tag that I can use at the start of every advert, and a &#8220;script src&#8221; tag I can use at the end.</p>
<p>So here&#8217;s how it works. You need to tell the SQL &#8220;update&#8221; command that you want to completely wipe out that block of your page. You&#8217;ll need to understand three basic MySQL functions &#8211; <em>replace, substr</em> and <em>locate</em>.</p>
<p>First, use LOCATE to tell the command the locations of the start and end points. In my case, I use the strings at the start and end of the section I want to remove. The start location on the page of the beginning is:</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">LOCATE <span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;script type=&quot;text/javascript&quot;&gt;'</span><span style="color: #66cc66;">,</span> post_content<span style="color: #66cc66;">&#41;</span></pre></div></div>

<p>The end location is trickier. Locate gives you the start of the string, so you have to add the number of characters to the very end of the string to get the ending location.</p>

<div class="wp_syntax"><div class="code"><pre class="sql" style="font-family:monospace;">LOCATE<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'&lt;script src='</span>http:<span style="color: #66cc66;">//</span>pagead2<span style="color: #66cc66;">.</span>googlesyndication<span style="color: #66cc66;">.</span>com<span style="color: #66cc66;">/</span>pagead<span style="color: #66cc66;">/</span>show_ads<span style="color: #66cc66;">.</span>js<span style="color: #ff0000;">&quot; type=&quot;</span>text<span style="color: #66cc66;">/</span>javascript<span style="color: #ff0000;">&quot;&gt;', post_content) + 93</span></pre></div></div>

<p>Next, you&#8217;re going to need to tell the &#8220;REPLACE&#8221; function exactly what text you want to replace. You do this by extracting the actual string out of the post content, using the SUBSTR function. You have to pass it the starting location (which you now have) and the length. The length you need to calculate by subtracting the starting position from the last position (which you also have).</p>
<p>Here is what that looks like, with the code above inserted into the SUBSTR function:</p>
<pre>substr(post_content, locate('&lt;script type="text/javascript"&gt;', post_content), ((locate('&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;', post_content) + 93) - (locate('&lt;script type="text/javascript"&gt;', post_content))))</pre>
<p>Looks crazy right? But if you look carefully, you&#8217;ll see there&#8217;s the three sections embedded &#8211; post content, start location, and length.</p>
<p>Now that you have the exact text that you want to remove from your posts, all you have to do is tell the REPLACE function to replace it with a space. Just copy the code above into the following command:</p>
<pre>UPDATE wp_posts SET post_content = replace(post_content, string_to_replace, replacement_string);</pre>
<p>Like this:</p>
<pre>UPDATE wp_posts SET post_content = REPLACE(post_content, substr(post_content, locate('&lt;script type="text/javascript"&gt;', post_content), ((locate('&lt;script src="http://pagead2.googlesyndication.com/pagead/show_ads.js" type="text/javascript"&gt;', post_content) + 93) - (locate('&lt;script type="text/javascript"&gt;', post_content)))), ' ');</pre>
<p>Running the script above, if all of the syntax is properly aligned, you should see the following successful results in phpAdmin.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove10.png?323f2c" alt="" width="521" height="236" /></p>
<p>Now, when I reload the posts in my web browser &#8211; voila! The ad has magically been stripped away.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove4.png?323f2c" alt="" width="482" height="271" /></p>
<p>Don&#8217;t get me wrong, it didn&#8217;t work on all ads, because I had some older ones that had slightly different formatting on the start and end. Like this page.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove5.png?323f2c" alt="" width="487" height="438" /></p>
<p>But with a little bit of tweaking, just changing the precise tags for start/finish, I was able to re-run the SQL and wipe those out as well.</p>
<p style="text-align: center;"><img class="aligncenter" style="border-width: 1px; border-color: black; border-style: solid;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/11/bulkremove6.png?323f2c" alt="how to edit wordpress" width="475" height="392" /></p>
<p>This technique will work to remove any content at all that is in your WordPress post content. That&#8217;s the beauty of having the posts in a MySQL database, you can simply run SQL commands to manipulate thousands of posts all at once &#8211; saving a tremendous amount of manual work. <strong>Just make sure to back up your database before you start!</strong></p>
<p>Do you have any other neat uses for this SQL command? Give it a shot on your own WordPress database and see how well it works for you. Share your experiences and feedback in the comments section below.</p>
<p><small>Image credits: <a href="http://image.shutterstock.com/display_pic_with_logo/112891/112891,1300420963,2/stock-photo-database-structure-d-background-73381360.jpg" rel="nofollow">Shutterstock</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/edit-thousands-wordpress-posts-sql-command/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>CommandLineFu: Amazing Collection Of Command Line Gems [Linux &amp; Mac]</title>
		<link>http://www.makeuseof.com/tag/commandlinefu-amazing-collection-command-line-gems-linux-mac/</link>
		<comments>http://www.makeuseof.com/tag/commandlinefu-amazing-collection-command-line-gems-linux-mac/#comments</comments>
		<pubDate>Sat, 29 Oct 2011 19:31:29 +0000</pubDate>
		<dc:creator>Justin Pot</dc:creator>
				<category><![CDATA[Cool Linux Apps & Tips]]></category>
		<category><![CDATA[Cool Mac Apps & Tips]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[cross platform]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=89219</guid>
		<description><![CDATA[Browse an assortment of amazingly useful commands. Whether you're an veteran system admin or a command-line neophyte striving to discover more, CommandLineFu is a vote-driven collection of commands that serves up thousands of ideas you should have thought of but didn't. Some see the command line as Linux's weak point, the ultimate symbol of a system lacking ease of use.]]></description>
			<content:encoded><![CDATA[<p><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-icon.png?323f2c" alt="linux command line" />Browse an assortment of amazingly useful commands. Whether you&#8217;re an veteran system admin or a command-line neophyte striving to discover more, <a href="http://www.commandlinefu.com">CommandLineFu</a> is a vote-driven collection of commands that serves up thousands of ideas you should have thought of but didn&#8217;t.</p>
<p>Some see the <a href="http://www.makeuseof.com/tags/command-line/">command line</a> as Linux&#8217;s weak point, the ultimate symbol of a system lacking ease of use. Others know the command line as one of Linux&#8217;s best features, giving learned users quick access to features most computer users don&#8217;t even know exist. There&#8217;s a reason even Mac OS X comes with a full-featured terminal. CommandLineFu is an encyclopedia of exactly those features. A database featuring over 8,000 unique commands, this site can seem overwhelming at first &#8211; just like the command line itself. Dig in though, and you will wonder just how you used a computer without the command line.</p>
<p>Sorry, Windows users &#8211; the majority of these commands only work on Linux. Some work on Mac OS X as well.</p>
<h2>Browsing</h2>
<p>Head over to <a href="http://www.commandlinefu.com">CommandLineFu</a> to get started. You will immediately see the commands submitted most recently.</p>
<p>You can &#8220;grep&#8221; (read: search) the archive, if you want, or simply click &#8220;<em>All Time Greats</em>&#8221; to see the most popular commands. Or if you prefer, simply browse the massive tag cloud that makes up this sites right sidebar.</p>
<h2>A Few Highlight Commands</h2>
<p>Experienced command line users will immediately find things they are interested in, but what about everyone else? Here is a quick list of my discoveries from this site.</p>
<h3><a href="http://www.commandlinefu.com/commands/view/71/serve-current-directory-tree-at-httphostname8000">Quick, Temporary Web Server</a></h3>
<p>Want to quickly share a file with someone? Set up your own web server in a few keystrokes with this handy command:</p>
<pre>python -m SimpleHTTPServer</pre>
<p>Just like that, your current directory will be shared. Here&#8217;s what it looks like in a web browser:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-temphost.png?323f2c" alt="linux command line" width="408" height="176" /></p>
<p>Naturally, you&#8217;re going to need to set up your router properly if you want to share with someone outside your current network. A dedicated IP or a service like <a href="http://www.makeuseof.com/tag/connect-home-network-dyndns/">DynDNS</a> will also be needed. Still, for local file sharing, it&#8217;s hard to beat the above command: it&#8217;s quick and easy. It worked for me on Ubuntu and OS X.</p>
<h3><a href="http://www.commandlinefu.com/commands/view/13/run-the-last-command-as-root">Run Preview Command As Sudo</a></h3>
<p>This one&#8217;s probably only useful for users of Ubuntu, or other systems utilizing <a href="http://xkcd.com/149/">sudo</a>. It allows you to re-run the last command you executed as sudo, perfect if you forgot to add that vital preface.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-sudo.png?323f2c" alt="linux command line tools" width="580" height="178" /></p>
<h3><a href="http://www.commandlinefu.com/commands/view/3386/check-your-unread-gmail-from-the-command-line">See Your Unread Emails</a></h3>
<p>Want a quick rundown of your unread emails? this simple command can do the trick, provided your email client of choice is Gmail.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-gmail.png?323f2c" alt="linux command line tools" width="580" height="233" /></p>
<p>It worked for me on Ubuntu and OS X; Linux users should make sure &#8220;curl&#8221; is installed.</p>
<h3><a href="http://www.commandlinefu.com/commands/view/1556/currently-mounted-filesystems-in-nice-layout">See Your Mounted Devices</a></h3>
<p>A mounted device is any storage drive plugged into your system and working. Need to see a full list of them? Simple.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-mounted.png?323f2c" alt="linux command line tools" width="580" height="188" /></p>
<h3><a href="http://www.commandlinefu.com/commands/view/1713/watch-star-wars-via-telnet">Watch A Text Version of StarWars</a></h3>
<p>Okay, this one&#8217;s not useful. It is, however, awesome. Watch a text-only version of Star Wars, complete with ASCII animated characters:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/commandlinefu-starwars.png?323f2c" alt="linux command line" width="580" height="358" /></p>
<p>The code for this is simple:</p>
<pre>telnet towel.blinkenlights.nl</pre>
<h2>3 Different Feeds</h2>
<p>Do you want to know every time a new awesome command is discovered? CommandLineFu offers three different Twitter and RSS feeds for just that purpose. Which one you use depends on how frequently you want updates; <a href="http://www.commandlinefu.com/site/faq">check them all out here</a>.</p>
<h2>Conclusion</h2>
<p>This site is awesome. Exploring it can teach you a great deal about not only the command line but also about computers in general.</p>
<p>Did you learn anything cool? Share links to your favorite commands in the comments below, or just list them yourself.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/commandlinefu-amazing-collection-command-line-gems-linux-mac/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>How To Automate Telnet Commands Using VB Script</title>
		<link>http://www.makeuseof.com/tag/automate-telnet-commands-vb-script/</link>
		<comments>http://www.makeuseof.com/tag/automate-telnet-commands-vb-script/#comments</comments>
		<pubDate>Thu, 13 Oct 2011 18:01:24 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[automate]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=88481</guid>
		<description><![CDATA[Writing batch jobs and more recently Windows scripts is an activity that really makes up the bulk of how the large majority of network and system administrators do their jobs faster, and simplify what would otherwise be time-consuming, complex tasks. Using batch jobs, you can automate installing and uninstalling applications and a multitude of other queries and jobs.]]></description>
			<content:encoded><![CDATA[<p><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/command.png?323f2c" alt="automate telnet" />Writing batch jobs (<a href="http://www.makeuseof.com/tag/write-simple-batch-bat-file/">.bat</a>) and more recently <a href="http://www.makeuseof.com/tag/3-awesome-windows-scripting/">Windows scripts</a> (.wsf) is an activity that really makes up the bulk of how the large majority of network and system administrators do their jobs faster, and simplify what would otherwise be time-consuming, complex tasks. Using batch jobs, you can automate installing and uninstalling applications, doing an inventory of software and OS settings of all PCs on your network, and a multitude of other queries and jobs. However, there are certain tasks that sometimes go through multiple layers of authentication, such as telnet.</p>
<p>Many network administrators have to telnet into network switches in order to query or set up ports, monitor the health of systems, or even reboot network devices that accept commands via telnet. Wouldn&#8217;t it be sweet if you could automate telnet jobs just like you would script regular batch jobs?</p>
<p>The truth is that if you are accustomed to using VB script to create your Windows scripts (or even if you aren&#8217;t), VB scripts provides a very useful feature where you can establish the Windows Shell script as an object, and then issue that &#8220;object&#8221; carefully timed commands. Essentially, this is exactly like you are sitting at a command window and typing in commands. The only difference is that your Windows script is sending the window the commands for you.</p>
<h2>Automate Your Telnet Job</h2>
<p>There are basically two parts to this task. You need to establish the sequence of commands that you want to go through during the typical telnet session.</p>
<p>Here&#8217;s what I want to do. I have 5 devices throughout the network that can be remotely rebooted via telnet by issuing 4 simple commands. I have to first telnet to it using the IP address and a specific port. Next, a menu appears, and I have to first press enter.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/telnet2.png?323f2c" alt="automate telnet" width="519" height="280" /></p>
<p>After I hit enter during this telnet session, the next menu expects a numeric response, followed by Enter.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/10/telnet3.png?323f2c" alt="automate telnet" width="580" height="293" /></p>
<p>Sounds a bit impossible for a scripting job, doesn&#8217;t it? Well, never underestimate the power of Visual Basic.</p>
<p>Now, there are other methods to do this. Just check out Abhigyan&#8217;s <a href="http://www.makeuseof.com/tag/automate-multiple-rapidshare-downloads/">article on Tst10.exe</a> to see how some people like to use the Tst scripting method to automate telnet sessions. Unfortunately, you&#8217;ll also see that it can be slightly complex for someone not accustomed to writing many scripts. Tcl is also another similar scripting language programmers have used for years for the same task.</p>
<p>However, I&#8217;m going to show you how a VB script file will do the same tasks in a fraction of the time and using a script that is monumentally easier to understand.</p>
<p>So here&#8217;s what we&#8217;re going to do. I&#8217;m going to break up the script into sections. Put all of these into a text file called something like <em>Autotelnet.wsf</em>, double click, and it&#8217;ll run.</p>
<p>First &#8211; establish the telnet session:</p>
<pre>&lt;job&gt;</pre>
<pre>&lt;script language="VBScript"&gt;</pre>
<pre>Option Explicit</pre>
<pre>On Error Resume Next</pre>
<pre>Dim WshShell</pre>
<pre>set WshShell=CreateObject("WScript.Shell")</pre>
<pre>WshShell.run "cmd.exe"</pre>
<pre>WScript.Sleep 1000</pre>
<pre>'Send commands to the window as needed - IP and commands need to be customized</pre>
<pre>'Step 1 - Telnet to remote IP'</pre>
<pre>WshShell.SendKeys "telnet xx.xx.xx.73 9999"</pre>
<pre>WshShell.SendKeys ("{Enter}")</pre>
<pre>WScript.Sleep 1000</pre>
<p>The section of code above will automatically open a command window and then telnet to the device on whatever specific port you need to connect. Replace &#8220;x&#8217;s&#8221; with your own IP.</p>
<p>The sleep command will wait long enough for the device to respond and prompt your script for the next command. Make sure this wait time is long enough for that action to take place.</p>
<p>Secondly, you need to send each command, one at a time, providing enough wait time between them for the telnet session to respond.</p>
<pre>'Step 2 - Issue Commands with pauses'</pre>
<pre>WshShell.SendKeys ("{Enter}")</pre>
<pre>WScript.Sleep 1000</pre>
<pre>WshShell.SendKeys "5"</pre>
<pre>WshShell.SendKeys ("{Enter}")</pre>
<pre>WScript.Sleep 1000</pre>
<p>In this example, I&#8217;ve issued the two commands that I noted above. First, I have the script send the &#8220;Enter&#8221; command, wait a second, then send a &#8220;5&#8243; and press &#8220;Enter&#8221; again. This short series of actions will perform exactly as though you were sitting in front of the telnet command window doing them yourself. You&#8217;ll just need to customize this script to perform the exact responses that your telnet session requires.</p>
<p>Finally, don&#8217;t forget to close the command window and end the script.</p>
<pre>'Step 3 - Exit Command Window</pre>
<pre>WshShell.SendKeys "exit"</pre>
<pre>WshShell.SendKeys ("{Enter}")</pre>
<pre>WScript.Quit </pre>
<pre>&lt;/script&gt;</pre>
<pre>&lt;/job&gt;</pre>
<p>That&#8217;s all there is to automate telnet &#8211; three easy steps inside a very uncomplicated script. Just take the three sections above and customize them to your heart&#8217;s desire. You&#8217;ll be automating all of your support tasks to manage network switches, time clocks or other remote systems that communicate via telnet.</p>
<p>If you have repetitive tasks that you have to do often, make your life a lot simpler by creating automated Windows scripts that&#8217;ll do those tasks for you. You&#8217;ll be more productive, and your boss will be really impressed!</p>
<p>Do you have any other ideas for cool tasks you could automate using this kind of Windows script? How have you been automating your own telnet tasks? Share your thoughts and insight in the comments section below.</p>
<p><small>Image Credit: <a href="http://image.shutterstock.com/display_pic_with_logo/53295/53295,1131269468,1/stock-photo-computer-command-prompt-696439.jpg" rel="nofollow">Shutterstock</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/automate-telnet-commands-vb-script/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Liven Up Your Windows Console With The Portable App ColorConsole</title>
		<link>http://www.makeuseof.com/tag/liven-windows-console-portable-app-colorconsole/</link>
		<comments>http://www.makeuseof.com/tag/liven-windows-console-portable-app-colorconsole/#comments</comments>
		<pubDate>Fri, 05 Aug 2011 22:31:23 +0000</pubDate>
		<dc:creator>Erez Zukerman</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[console]]></category>
		<category><![CDATA[portable app]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=82152</guid>
		<description><![CDATA[Some time ago I wrote about an alternative console client for Windows called Console. These was a fairly lively discussion in the comments, so I figured I’d share another interesting console client I found; this one is called ColorConsole, and it’s tiny, portable and free. The premise is quite similar to Console.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image109.png"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image109.png?323f2c" alt="alternative console for windows" />Some time ago I wrote about an alternative console client for Windows called <a href="http://www.makeuseof.com/tag/console-lets-work-windows-command-line-mode-style/">Console</a>. These was a fairly lively discussion in the comments, so I figured I’d share another interesting console client I found; this one is called <a href="http://www.softwareok.com/?seite=Freeware/ColorConsole">ColorConsole</a>, and it’s tiny, portable and free.</p>
<p>The premise is quite similar to Console, in that it dresses up your dull Windows CMD window in pretty colors (with multiple themes) and makes the text zoomable. It does add a few interesting features, though. First, let’s take an overall look at the window:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/SNAGHTML373f9732.png?323f2c" border="0" alt="alternative console for windows" width="580" height="411" /></p>
<p>The menu seems a bit squashed, but that’s just because I reduced the size of the window so I could take the screenshot. The HTML and RTF buttons are interesting; watch what happens when I click the HTML button:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/SNAGHTML3741f873.png?323f2c" border="0" alt="alternative windows console" width="580" height="450" /></p>
<p>That’s the exact same output, in the same colors and fonts, but in a Chrome window. ColorConsole just rendered the complete window in HTML, colors and all.</p>
<p>You can save this HTML file, post it to the Web or email it, to show someone the exact output you got on your screen. If it’s just one screenful, you can just as easily copy and paste the information. But the HTML/RTF export feature actually outputs a dump of the entire console session, so you can send someone a detailed log showing many commands, in a very readable format.</p>
<p>Speaking of readability, my chosen theme may not be your cup of tea. Fortunately, ColorConsole offers several other themes:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image110.png?323f2c" border="0" alt="alternative windows console" width="580" height="350" /></p>
<p>The names are very dramatic (&#8220;Blood-Matrix&#8221;) and contain the occasional typo (&#8220;Withe&#8221; and &#8220;Perl&#8221;), but they’re descriptive enough. There doesn’t seem to be a way to create your own themes.</p>
<p>The app seems to be originally written in German, so if (like several of our own writers) that’s a language you speak, you may find the text to be of higher quality. German and English are not the only available interface languages, though:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image111.png?323f2c" border="0" alt="alternative windows console" width="580" height="350" /></p>
<p>The “I-NET ?” button offers an option I haven’t seen in other consoles. It lets you search any text you highlight using a search engine. So you can highlight a command or output you don’t know, and quickly look them up on the Web.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image112.png?323f2c" border="0" alt="change windows console" width="487" height="258" /></p>
<p>Okay, I do know what &#8220;dir&#8221; does, but it’s a good example. I figured clicking the option would just Google the command for me, but was surprised to find myself in a different search engine altogether:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image113.png?323f2c" border="0" alt="change windows console" width="580" height="350" /></p>
<p>While there is a &#8220;Google&#8221; button, this feature is obviously oriented at German-speaking users (like much of the application). That makes sense, but I wish there was a way to configure the engine used. This is a potentially handy feature, but the selection of engine makes it much more niche than it should be.</p>
<p>If you’re new to the command line and there are commands you tend to forget, you may find the Commands menu useful:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image114.png?323f2c" border="0" alt="alternative console for windows" width="580" height="350" /></p>
<p>By default, it adds a list of common commands which most users probably know and often use (except for &#8220;tree&#8221; perhaps). But by clicking <em>Add</em>, you can edit this list and fill it with your own commands, including specific command line switches and other handy options. This can serve as a quick reference if you use a wide range of arcane commands.</p>
<h2>Final Thoughts</h2>
<p>ColorConsole is tiny (200KB), portable and free. Its English localization may do with a bit of improvement, and a few options wouldn’t hurt (such as customizing the search engine). Still, it’s an interesting experiment, and may make for a handy addition to your command-line toolkit. I could definitely see myself using it occasionally, if only for the HTML/RTF export options.al</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/liven-windows-console-portable-app-colorconsole/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Console Lets You Work In Windows Command Line Mode With Style</title>
		<link>http://www.makeuseof.com/tag/console-lets-work-windows-command-line-mode-style/</link>
		<comments>http://www.makeuseof.com/tag/console-lets-work-windows-command-line-mode-style/#comments</comments>
		<pubDate>Thu, 21 Jul 2011 22:31:35 +0000</pubDate>
		<dc:creator>Erez Zukerman</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=80691</guid>
		<description><![CDATA[When it comes to the command line, it seems that Linux and Mac OS users get all the fun. They have fantastic shell environments, but more importantly, they have a very slick console application to access their text shells. But for Windows users, in sweeps Console, ready to save the day with its awesome-sauce and open-source chic.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image19.png"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image19.png?323f2c" alt="command line interface" />When it comes to the command line, it often seems that our Linux and Mac OS brethren get to have all the fun. They have all of these fantastic shell environments (bash and zsh, for example), but more importantly, they have some very slick console application to access their text shells from within X-Windows or OS X.</p>
<p>While recent version of Windows have started offering something called <a href="http://technet.microsoft.com/en-us/scriptcenter/dd742419.aspx">PowerShell</a>, that addresses only half of the problem. <em>Using</em> PowerShell is still a decidedly eighties-style experience, with plain looking windows and a dearth of customization options. In sweeps <a href="http://sourceforge.net/projects/console/">Console</a>, ready to save the day with its awesome-sauce and open-source chic.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image20.png?323f2c" border="0" alt="command line interface" width="580" height="350" /></p>
<p>At its simplest, you can use Console to create a ginormous-looking command console. &#8220;<em>But this can be done with Windows’ own console!</em>&#8221; I hear you say. You’re right, you really <em>can</em> change the font size with the default Windows tool. What you <em>can’t</em> do is smoothly drag it to change its width – and that’s something Console easily lets you do.</p>
<p>This alone may not be worth the hassle of installing a new app. Fortunately, Console has several other tricks up its sleeve. Check this out:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image21.png?323f2c" border="0" alt="windows command line mode" width="580" height="350" /></p>
<p>This is part of Console’s Settings dialog, which lets you configure multiple tabs. Not only can you have several tabs, but each tab can use a <em>different</em> shell! So you can have normal Windows &#8220;cmd&#8221; running alongside PowerShell, in one single app. In fact, there it is:</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image22.png?323f2c" border="0" alt="windows command line mode" width="580" height="350" /></p>
<p>This screenshot gave me a chance to demo another PowerShell feature called alpha transparency. While there are plenty of third-party utilities that let you set window opacity for any app on your system (<a href="http://www.makeuseof.com/tag/5-desktop-enhancements-you-should-see/">Volumouse</a>, anyone?), it’s nice to have that option built right into Console.</p>
<p>Console&#8217;s tabs are different than your browser’s tabs in one key respect: Each new tab type you make gets saved, and you can then quickly access that type of tab using the New Tab menu.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/image23.png?323f2c" border="0" alt="command line interface" width="580" height="350" /></p>
<p>By the way, can you see how the text cursor in the screenshot above looks a bit strange? That’s because it’s <em>pulsing</em> – Console lets you select one of several styles for your cursor, and I went for one that constantly changes size, just to see what it’s like. It’s a cute gimmick but not something I think I’d use on a regular basis.</p>
<p>Another one of my pet peeves about Windows’ default console is that for some obscure reason, you can’t just select text and copy it! You need to go to the window menu, select <em>Edit</em>, then <em>Mark</em>. What’s the deal, Microsoft? With Console, I can just hold down Shift, start dragging, and text is selected for copying just like I would expect it to work. Once text is selected, you do need to use a toolbar button to copy it – if you’ve ever used the console before, you may remember that Ctrl+C means &#8220;Break&#8221; in DOS.</p>
<h2>Bottom Line</h2>
<p>I first used Console when I needed it for screen-sharing. I was looking for a way to quickly make a <em>huge</em> console window that the other person could clearly see even though resolution was terrible on our connection. It did the trick then, but that was using just part of its abilities. If you spend any length of time using Windows’ command-line tools, then first – you have my condolences. Second, you really should take Console for a spin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/console-lets-work-windows-command-line-mode-style/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
		<item>
		<title>5 Fun &amp; Useful Terminal Commands You Can Use More Than Once [Mac &amp; Linux]</title>
		<link>http://www.makeuseof.com/tag/5-fun-terminal-commands-mac-linux/</link>
		<comments>http://www.makeuseof.com/tag/5-fun-terminal-commands-mac-linux/#comments</comments>
		<pubDate>Mon, 11 Jul 2011 22:30:06 +0000</pubDate>
		<dc:creator>Habib Alamin</dc:creator>
				<category><![CDATA[Cool Linux Apps & Tips]]></category>
		<category><![CDATA[Cool Mac Apps & Tips]]></category>
		<category><![CDATA[MakeUseOf Lists]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[terminal]]></category>
		<category><![CDATA[terminal tips]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=79829</guid>
		<description><![CDATA[There is a ton of information on the Internet about various Terminal commands and ways to customise your Mac or Linux machine with the Terminal. Here are some commands which are really useful and can benefit you if you learn them. Check out these 5 useful commands.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Terminal_300.png" /><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Terminal_300.png?323f2c" alt="mac terminal commands"/>There is a ton of information on the Internet about various Terminal commands and ways to customise your Mac or Linux machine with the Terminal. There are lots of secret settings  in OS X, and it&#8217;s very common to see a command like this:</p>
<pre> com.company.product entry valuetype value</pre>
<p><em>defaults</em> is a command-line app for editing plist files, i.e. app preference files. <em>write</em> is a feature of defaults and it&#8217;s a command which adds an entry or edits entries of plist files. defaults is a hard application to use, so you could use an app called <a href="http://secrets.blacktree.com/">Secrets</a>, <a href="http://www.makeuseof.com/tag/unveil-mac-os-x-hidden-features-with-secrets/">covered on MakeUseOf before</a>, to take advantage of these without learning the command.</p>
<p>Most of the time, you will edit the same plist entry only once. After the preference takes effect, you will never need to enter that command again. However, there are some commands which are really useful and can benefit you if you learn them. Here are 5 useful commands that can be used more than once.</p>
<h2><a href="http://www.makeuseof.com/tag/ssh-ftp-technology-explained/">SSH</a></h2>
<p>This can be used to <em>securely</em> remotely login to another device which has remote login enabled. It is commonly used to login to jailbroken iPhones and send files. It is also used to repair computers without a display attached or to make sure they are still working. SSH can also be used to <a href="http://www.makeuseof.com/tag/how-to-tunnel-traffic-with-ssh/">tunnel web traffic</a>.</p>
<p>If you&#8217;re on OS X, you must make sure that remote login is turned on in the computer you want to remotely login to. You can do this by going to the Sharing pane in System Preferences, then ticking the &#8220;Remote Login&#8221; checkbox. Note down the bit in quotes after, &#8220;To log in to this computer remotely…&#8221;</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Screenshot-2011-07-02-at-15.10.33.png?323f2c" alt="mac terminal commands" width="550" height="461" />That&#8217;s what you have to type into the terminal to log in to that account on that computer. To login using SSH, simply type:</p>
<pre>ssh user@host</pre>
<p>Where host is the IP. Then verify that you want to connect and enter the remote computer&#8217;s password. From there, you can issue commands from the Terminal remotely.</p>
<p>For Ubuntu, just install OpenSSH, by using:</p>
<pre>sudo apt-get install openssh-server</pre>
<p>Then check your IP address by clicking nteworking icon on the menu bar, then clicking &#8220;Connection Information&#8221;. Check your IP address (not the &#8220;broadcast&#8221; one) and note it down.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Screenshot-2011-07-02-at-15.49.24.png?323f2c" alt="ubuntu terminal commands" width="440" height="515" /></p>
<p>To login remotely, type in the same as before.</p>
<h2>say [OS X Only]</h2>
<p>This is limited to OS X machines. Sorry, Linux users. But for you Mac users, <em>say</em> just makes your Mac speak. You would type in:</p>
<pre>say TYPE IN SCRIPT HERE</pre>
<p>No quotation marks are needed to enclose the speech or anything. Alternatively, you could first type in
<pre>say</pre>
<p>, press return, and then everything you type after that is what the Mac will say. This can be use to make your Mac sing as well, if you type this:</p>
<pre>say -v Cellos "TYPE IN SCRIPT HERE"</pre>
<p>Just add
<pre>-v</pre>
<p> to change the voice to a voice of your choice. This time, you&#8217;ll need the quotation marks.</p>
<h2>mv + cp</h2>
<p>This command is very useful for moving things. But this is easier to do in the file browser, why the CLI? Well, if you put a dot in front of a file with most UNIX-like systems, like Linux and all POSIX-compliant systems, like OS X it hides the file. With OS X, you cannot just add a dot. It doesn&#8217;t allow you to. So use the Terminal to hide your top secret project, because mv is also used to rename files. cp can copy files if you want.</p>
<pre>mv ~/Desktop/sourcename.txt ~/Documents/destinationname.txt</pre>
<p>With Linux, you must put the two locations in single quotes.</p>
<h2>cd</h2>
<p>To navigate to a location on your Terminal, just type:</p>
<pre>cd location</pre>
<p>You can also drag the folder to the Terminal window after typing cd  and then press Enter.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Screenshot-2011-07-02-at-18.09.39.jpg?323f2c" alt="ubuntu terminal commands" width="500" height="481" /></p>
<p>This shortcut works on both OS X and Linux, though it&#8217;s a tiny bit easier on OS X. To navigate to your home folder, just type:</p>
<pre>cd</pre>
<h2>ls</h2>
<p>Use <em>ls</em> to see the contents of a directory. First you must cd into the  location. Then just type:</p>
<pre>ls</pre>
<p>This even allows you to see invisible files. Now, can you see how the last three commands link to each other? Now you can find files you hid. If you forget the filenames exactly, this will help you. Now you can restore the hidden files, using the mv command to remove the dot.</p>
<p><img class="aligncenter" style="border: 0pt none;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/07/Screenshot-2011-07-02-at-18.04.28.png?323f2c" alt="mac terminal commands" width="560" height="340" /></p>
<h2>Conclusion</h2>
<p>What do you think? Have you ever used the command line before? If not, did you find these tools easy to use? What other command line tools can you recommend? Tell us by commenting below!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/5-fun-terminal-commands-mac-linux/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>10 Useful Command-Line IrfanView Tools For Working With Images</title>
		<link>http://www.makeuseof.com/tag/10-useful-commandline-irfanview-tools-working-images/</link>
		<comments>http://www.makeuseof.com/tag/10-useful-commandline-irfanview-tools-working-images/#comments</comments>
		<pubDate>Fri, 08 Jul 2011 16:31:53 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Web Apps & Internet]]></category>
		<category><![CDATA[command line]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[image editors]]></category>
		<category><![CDATA[image tools]]></category>
		<category><![CDATA[image viewer]]></category>
		<category><![CDATA[images]]></category>
		<category><![CDATA[screenshot]]></category>
		<category><![CDATA[scripts]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=79614</guid>
		<description><![CDATA[These days, screenshot applications are a dime a dozen, and you can do image editing offline, online and even on your phone. So what's a new way that you can make use of image editing or screenshot tools that goes beyond just opening up an app and editing images? What if you could integrate image editing directly into your batch jobs or Windows scripts?]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/script2.png"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/script2.png?323f2c" alt="irfanview command line" />These days, screenshot applications are a dime a dozen, and you can do image editing <a href="http://www.makeuseof.com/tag/livebrush-a-versatile-freewareimage-editor-that-lets-you-draw-like-an-artist/">offline</a>, <a href="http://www.makeuseof.com/tag/5-really-powerful-online-image-editing-tools/">online</a> and even <a href="http://www.makeuseof.com/tag/photoshop-mobile-a-freeware-image-editor-to-edit-photos-on-your-mobile/">on your phone</a>. So what&#8217;s a new way that you can make use of image editing or screenshot tools that goes beyond just opening up an app and editing images? What if you could integrate image editing directly into your batch jobs or <a href="http://www.makeuseof.com/tag/batch-windows-scripting-host-tutorial/">Windows scripts</a>?</p>
<p>If you&#8217;re familiar with <a href="http://www.makeuseof.com/tag/6-cool-irfanview-plugins-enhance-simple-image-editor/">IrfanView</a>, and think that it&#8217;s only a simple image editor and screenshot app, then I invite you to take another look. All of the following script commands can be run from the command prompt, so long as you are working in the directory where IrfanView is installed &#8211; which is typically <em>&#8220;C:\Program Files(x86)\IrFanView\&#8221;. </em>All of the following commands will work from there, or you can include that directory in your system PATH variable so that the &#8220;<em>i_view32.exe</em>&#8221; command will be recognized no matter where you&#8217;re working from.</p>
<h2>Running IrfanView Commands</h2>
<p>You can find a long list of script commands from within the IrfanView application when you click on Help and search for &#8221;<em>command line options</em>&#8220;. I want to point out 10 of the most powerful and useful commands that are available.  You can issue these from the command prompt (or from within a Windows Script or Batch file).</p>
<h3>Create An Instant Slideshow</h3>
<p>The first command I want to show you is one that creates an instant slideshow from a whole bunch of pictures. These can be pictures that you have stored in a directory, or from a list of files defined in a text file. The command is as follows:</p>
<pre>"i_view32.exe /slideshow=c:\temp\testpics\*.* /closeslideshow"</pre>
<p>The way this works is simple. You could replace  &#8221;<em>c:\mypictures\*.*</em>&#8221; with &#8220;<em>c:\mypics.txt</em>&#8220; if you like if you want to use a text file filled with a list of pictures with the full path for each.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan1.jpg?323f2c" alt="irfanview command line" width="574" height="495" /></p>
<p>Pictures show up in the center of your screen on a black background. The /closeslideshow parameter tells the app to close automatically after the last picture.</p>
<p>The nice thing about being able to launch a slideshow with one command line is that you can display your slideshow instantly without any work. Just type the command and start scrolling!</p>
<h3>Look At All Images In A Directory</h3>
<p>The next command is a fast way to take a look at all images within a directory without the need to open up every one of them.</p>
<pre>"i_view32.exe c:\temp\testpics /thumbs"</pre>
<p>This instantly launches IrfanView in thumbnail mode, and defaults to the directory that you&#8217;ve defined.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan2.jpg?323f2c" alt="irfanview command line options" width="529" height="392" /></p>
<h3>Resize Lots Of Images At Once</h3>
<p>The third command I want to cover is my favorite. One thing that I find annoying and time consuming is resizing a large collection of images.</p>
<p>Instead, just issue this command and you&#8217;re done in seconds.</p>
<pre>"i_view32.exe c:\temp\testpics\*.jpg /resize=(200,100) /aspectratio /resample /convert=c:\temp\testpics\testsmall\*.png"</pre>
<p>Let me break this down. The first part defines your source directory and image type. Then you define the resize parameters. The last part of the command will convert the output images to any format. In seconds, all images are done.</p>
<p><img class="aligncenter" style="border: 1px solid black;" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan3.jpg?323f2c" alt="irfanview command line options" width="580" height="410" /></p>
<h3>Send Image Collections To The Printer</h3>
<p>The fourth command is pretty simple. Want to send a collection of images to your default printer? Just issue the following command.</p>
<pre>"i_view32.exe c:\testpics\*.jpg /print"</pre>
<h3>Take Instant Screenshots With A File Timestamp</h3>
<p>Another pretty cool command is one that takes an instant screenshot and saves as a file with a time stamp.</p>
<pre>"i_view32.exe /capture=0 /convert=c:\temp\capture_$U(%d%m%Y_%H%M%S).jpg"</pre>
<p>The capture=0 could be 1 (current monitor), 2 (foreground window), 3 (client area), 4 (rectangle section), or 5 (launch in capture mode).</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan4.jpg?323f2c" alt="irfanview command line options" width="579" height="501" /></p>
<p>Once the full screenshot is saved to file, you can email it or process it using other Windows Scripting or Batch commands. The potential of this command is pretty powerful.</p>
<h3>Search For Images Quickly On Your Computer</h3>
<p>The sixth command is a fast and easy way to search for images on your computer. Just type:</p>
<pre>"i_view32.exe c:\temp\testpics\ /thumbs /filepattern="*.png""</pre>
<p>This will open IrfanView in thumbnail mode, using the file pattern that you defined.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan5.jpg?323f2c" alt="irfanview commands" width="580" height="265" /></p>
<h3>Deny User Permissions</h3>
<p>The next command I wanted to show you is probably the coolest. Let&#8217;s say that you&#8217;re writing a Windows Script and you want to display a picture to the user, but you don&#8217;t want to let them modify or change the file. You can accomplish this with the following command:</p>
<pre>"i_view32.exe c:\test.jpg /hide=7"</pre>
<p>The &#8220;hide&#8221; value is a combination of what parts of the window you want to hide. Just choose 1 (toolbar), 2 (status bar), 4 (menu bar), or 8 (caption). To combine multiple parts of the window, just add the numbers together!</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan6.jpg?323f2c" alt="irfanview commands" width="433" height="345" /></p>
<p>Be careful about using 15, because if you hide everything, the user will have no way of ever closing the window at all.</p>
<h3>Output Text Files To A TIF File</h3>
<p>Some other wonderfully useful commands include outputting text files to a TIF file:</p>
<pre>"i_view32.exe c:\test.jpg /append=c:\test.tif"</pre>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan7.jpg?323f2c" alt="irfanview commands" width="367" height="257" /></p>
<h3>Create A Panorama Image</h3>
<p>Creating a panorama image from multiple images &#8211; 1 is horizontal and 2 is vertical.</p>
<pre>"i_view32.exe /panorama=(1,c:\pics\china1.png,c:\pics\china2.png,c:\pics\china3.png)"</pre>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan9.jpg?323f2c" alt="" width="558" height="309" /></p>
<h3>Set An Image As Desktop Wallpaper</h3>
<p>Finally, the command that could also make for a pretty good practical joke if you use the right photo, the command to set an image as the computer desktop wallpaper background.</p>
<pre>"i_view32.exe c:\test.jpg /wall=0"</pre>
<p>Set wall equal to 0 for a centered image, 1 to tile it, 2 to stretch it and 3 to resize the image proportionally.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/06/irfan10.jpg?323f2c" alt="irfanview command line" width="581" height="563" /></p>
<p>You can set the background image on your PC using this command much faster than the number of clicks it takes to do it otherwise. That&#8217;s the beauty of the set of command tools you get through IrfanView &#8211; you can process and manipulate images on your PC much faster and more efficiently than would ever be possible using the old point and click approach.</p>
<p>Give a few of these commands a try on your own PC and see if it helps you save a little time and become more productive when dealing with images. Share your thoughts and your own IrfanView command line tips in the comments section below.</p>
<p><small>Image credits: <a rel="nofollow" href="http://www.sxc.hu/photo/995000">Kakao Por</a></small></p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/10-useful-commandline-irfanview-tools-working-images/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>The 8 Useful DOS Commands That You Should Memorize</title>
		<link>http://www.makeuseof.com/tag/8-dos-commands-memorize/</link>
		<comments>http://www.makeuseof.com/tag/8-dos-commands-memorize/#comments</comments>
		<pubDate>Wed, 04 May 2011 21:31:20 +0000</pubDate>
		<dc:creator>Ryan Dube</dc:creator>
				<category><![CDATA[Cool Windows Apps & Tricks]]></category>
		<category><![CDATA[commands]]></category>
		<category><![CDATA[dos]]></category>
		<category><![CDATA[old-school]]></category>

		<guid isPermaLink="false">http://www.makeuseof.com/?p=74245</guid>
		<description><![CDATA[Windows 7 still features a command prompt window. so there's still a place for DOS commands. So for those of you that like the idea of typing in a few commands to avoid the hassle of several mouse clicks, I'm going to review eight of what I consider to be the most essential and helpful DOS commands that are still available in Windows 7.]]></description>
			<content:encoded><![CDATA[<p><firstimage="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/dosprompt.jpg"><img class="align-right" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/dosprompt.jpg?323f2c" alt="dos commands" />I realize that providing a lesson on DOS commands to MUO readers is sort of like offering to teach a group of martial arts experts how to throw a punch. The thing is, there are quite a few people out there that don&#8217;t realize how easy it is to troubleshoot and fix certain computer issues using a few simple key entries. I&#8217;m not about to argue that DOS isn&#8217;t outdated. However, Windows 7 still features a command prompt window.</p>
<p>We&#8217;ve covered a number of current uses for DOS, such as  playing <a href="http://www.makeuseof.com/tag/7-sites-find-classic-dos-games/">DOS games</a>. I also provided some <a href="http://www.makeuseof.com/tag/batch-windows-scripting-host-tutorial/">Windows Scripting tips</a>, which is the next generation replacing DOS commands. With that said, there&#8217;s still a place for DOS commands. So, for those of you that like the idea of typing in a few commands to avoid the hassle of several mouse clicks, I&#8217;m going to review eight of what I consider to be the most essential and helpful DOS commands that are still available in Windows 7.</p>
<h2>The DOS Prompt Window Is Not Missing!</h2>
<p>If you are one of those folks that became convinced the DOS prompt was officially wiped out with Windows 7, all you have to do is click on the Start menu, and in the &#8220;<em>Search programs and files</em>&#8221; field, just type &#8220;<em>cmd</em>&#8221; and press enter. Voila &#8211; there&#8217;s your DOS window.</p>
<h3>Assoc: Associated Extension</h3>
<p>Not sure what default program you have set up to handle ZIP, MP3 or HTML files? A quick and easy way to check for your default file associations is the &#8220;assoc&#8221; command. Just open a command prompt and type &#8220;<em>assoc</em>&#8221; followed by the file extension.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm1.png?323f2c" alt="dos commands" width="559" height="223" /></p>
<p>The response is the installed application that is currently configured to handle that file type. As you can see above, WinRAR is my ZIP file handler, MS Word handles doc files, and Chrome is set up as the default for HTML files.</p>
<h3>Tree: View Directory Structure</h3>
<p>If you&#8217;ve created a virtual spiderweb of files and directories on your computer, it can get pretty confusing to remember where everything is. Sometimes it would be nice to have a diagram showing directories and sub-directories. Using the Tree command, you can do just that.</p>
<p>First, navigate to the directory you want to get the file structure of, and then type &#8220;<em>tree &gt; myfile.txt</em>&#8220;. The text file can be called anything you like.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm2.png?323f2c" alt="ms dos commands" width="562" height="222" /></p>
<p>The command writes the entire directory structure, completed with all folders, into the text file, which you can print out for easy viewing.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm3.png?323f2c" alt="ms dos commands" width="394" height="403" /></p>
<p>The formatting may look a little bit funky, but if you look closely you&#8217;ll see that the directories are all there, they just might be prefaced with some weird symbols.</p>
<h3>File Search &amp; Comparison</h3>
<p>If you ever have two text files &#8211; particularly two very large text files &#8211; the file compare (fc) command is all you need to identify and synchronize file differences.</p>
<p>The usage is about as easy as it can get. Just type &#8220;<em>fc</em>&#8221; followed by the names of the two files.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm4.png?323f2c" alt="ms dos commands" width="431" height="222" /></p>
<p>The system will respond by showing the lines from both files where there are differences.  This command can become pretty handy when you&#8217;re collaborating with people and trying to sync up differences between files that several people are working on.</p>
<p>If you only need to find a file on your system, and you know the name of the file, the &#8220;find&#8221; command is far faster than any point and click operation you can do. Just do a &#8220;dir&#8221; command to the directory you want to search, and then &#8220;|&#8221; followed by the name of the file.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm5.png?323f2c" alt="dos prompt commands" width="431" height="222" /></p>
<p>The system will respond with the directory where the file is stored.</p>
<h3>Network Commands</h3>
<p>I really don&#8217;t think there are easier ways available to do network troubleshooting than the sort of tools you get in DOS commands. For example, if you want to know your basic network setup, just do a quick &#8220;<em>ipconfig</em>&#8221; and you will get details like your computer IP and the default gateway (which is typically your home router IP address).</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm6.png?323f2c" alt="" width="501" height="323" /></p>
<p>If you&#8217;re not sure you have a good network connection, try doing a &#8220;ping&#8221; to a known IP address or a website. You&#8217;ll see it echo back with an IP address if the link is good. If you want to see <em>all</em> network connections currently active from your PC, type &#8220;<em>netstat</em>&#8220;.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm7.png?323f2c" alt="" width="555" height="384" /></p>
<p>This shows you all network connections from your PC. It may be a good idea to search through these carefully to make sure that there&#8217;s no surprises in the form of malware or a virus hijacking your bandwidth.</p>
<h3>Windows Utilities</h3>
<p>Finally, there are a multitude of DOS commands that are invaluable as system troubleshooting tools. For example, to view a list of active processes, just open up a command prompt and type &#8220;<em>tasklist</em>&#8220;.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm8.png?323f2c" alt="dos prompt commands" width="525" height="358" /></p>
<p>If you see any process you want to kill, just type &#8220;<em>taskkill</em>&#8221; follwoed by the image name.</p>
<p>Nervous about whether a particular system file became corrupted after a recent virus infection? Just type &#8220;<em>sfc /VERIFYFILE=</em>&#8221; followed by the full path of the file.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/comm9.png?323f2c" alt="dos prompt commands" width="536" height="88" /></p>
<p>Windows will check to be sure it is the original. You can also scan <em>all</em> system files like this at once by typing &#8220;<em>sfc /scannow</em>&#8221;</p>
<p>Finally, probably one of the most useful DOS commands available &#8211; the AT command. With &#8220;AT&#8221;, you have the ability to schedule tasks to run on a regular routine, all from a simple command prompt.</p>
<p><img class="aligncenter" src="http://main.makeuseoflimited.netdna-cdn.com/wp-content/uploads/2011/04/at_command.png?323f2c" alt="dos commands" width="559" height="222" /></p>
<p>Setting up the AT commands can be a little tricky, so type &#8220;<em>at help</em>&#8221; if you need parameter help. In the command above I set up the computer to automatically archive all files in the temp directory to the archive folder. You could do similar jobs to routinely back up important files on your computer to a mapped external drive.</p>
<p>As you can see, there&#8217;s still plenty that you can do with the command prompt. Having these resources at your fingertips can really make it a lot easier to troubleshoot, maintain and repair computer systems.</p>
<p>Were any of these commands new to you? Do you know of any other useful DOS tips? Share your insights in the comments section below.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.makeuseof.com/tag/8-dos-commands-memorize/feed/</wfw:commentRss>
		<slash:comments>26</slash:comments>
		</item>
	</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (Requested URI is rejected)
Database Caching 1/48 queries in 0.215 seconds using apc
Object Caching 678/808 objects using disk: basic
Content Delivery Network via main.makeuseoflimited.netdna-cdn.com

Served from: www.makeuseof.com @ 2012-02-10 16:26:32 -->
