Saturday, November 26, 2011

Basic Command Prompt Skills

Believe it or not, computers weren’t always the point-and-click wonders we know now.  No, they used to be giant creatures who’d take their input on punch cards and spit out a result on actual paper.  Almost makes you want to do your math in your head, yes?
Although those days are long over, one fact of those eras remains: the stench of the command line.  Yes, ladies and gentlemen, they still exist in modern computers, and I’m going to explain to you how to use it in your favorite operating system – Mircosoft Windows.
Essentially, there are only two different desktop (to distinguish from iOS or Android) operating systems out there.  Yes, I know that sounds ludicrous, but bare with me, because it’s true.  These two operating systems are MS-DOS (from which Windows is based), and Linux.
Now, hold on, you’re saying.  My nephew has a Mac, my husband uses Ubuntu at work, and surely they fit in somewhere!
They do, actually.  Both those fit into the Unix category.  Ubuntu is a form of Linux, which is a form of Unix written by Linus Torvalds.  And Macs are actually built on top of Linux and utilize a special form of Unix underneath called the Darwin Terminal (I’m sure you Mac diehards will know this already; for everyone else, Unix is a topic for another day).
Now, Windows is based upon MS-DOS.  In the beginning of Windows’s existence, it basically echoed all your commands to DOS which performed the action (to all of you who are wondering – MS-DOS is an acronym for Mircosoft Disc Operating System).  However, in modernity Windows can perform most of its actions itself now, and DOS is provided mainly for compatibly with old programs.
Now, onto using DOS and the terminal in general.  Here we go; here’s how to access the terminal:
  • In Windows: Go to the Start Menu, click All Programs, click Accessories, click Command Prompt.
  • In Mac OS X: Open a Finder window.  Go to your applications folder and find a folder called Utilities.  Open that folder then find the program called Terminal.  Double-click it to start it up.
  • Ubuntu: Use these instructions, taken from the Ubuntu docs:
Unity is the default Desktop Environment used in 11.04. Where systems are not ready for Unity they revert to Gnome which is also used in previous releases such as Ubuntu 10.04 LTS (Lucid), see next sub-section.
The easiest way to open the Terminal is to use the 'search' function on the dash. Or you can click on the 'More Apps' button, click on the 'See more results' by the installed section, and find it in that list of applications. A third way, available after you click on the 'More Apps' button, is to go to the search bar, and see that the far right end of it says 'All Applications'. You then click on that, and you'll see the full list. Then you can go to Accessories > Terminal after that. So, the methods in Unity are:
Dash -> Search for Terminal
Dash -> More Apps -> 'See More Results' -> Terminal
Dash -> More Apps -> Accessories -> Terminal
Keyboard Shortcut: Ctl + Alt + T
Today we’re going to focus on the MS-DOS commands.  In a later post I will cover Linux, which will apply to Mac users as well.

1.  Basics

The most standard thing you can do as simply navigate around your directory file structure.  You can do it by typing each of these commands into the MS-DOS window, then pressing Enter to confirm the command.
command-line-start
  • cd
    Change Directory Access a new directory by typing “cd directory-name”.  Navigate to “..” (that’s two periods), to go up a directory level.
  • dir
    Get a listing of every file and folder on the current directory you are in.
  • type
    Enter the contents of a plain, text (.txt extension) file, and the computer will write it out for you.  If it’s a long file, though, the lines may print so fast you can’t see them.  Also, don’t enter a Mircosoft Word file into this command: you won’t like the result.  Example: “type readme.txt”
Now that you know the three basic commands, try everything out.  Use “dir” to obtain a list of files and folders, “cd” to go to a different folder, and when you see a .txt file, use “type filename.txt” to print it onto the window.
And don’t worry: none of these commands in this section change your computer in any way.  Don’t be afraid to play around.

2. Getting Funky

You can do lots of things in the command prompt.  Things that are difficult, or even impossible, to do using the standard Windows interface.  Just type “help” to see them all.  Some of the commands may sound alien to you, like “mklink”, “icacls”, etc.  Best word of advice: don’t mess around with them.  Until you know what something does, don’t play with it.
We’re going to do something small and neat.  There exists a Windows command called “fc” that examines two files and displays the differences between them.  So go ahead and create two text files with Notepad.  Put anything in them, and save them (be sure with the .txt extension).  Navigate to where you saved them with “cd” then type “fc first-file second-file”.  Be sure to include the .txt extension – if you don’t the computer doesn’t like it.
The computer should spit out some output.  If it doesn’t, check your input, otherwise message me in the comments.  Happy Hunting!

Wednesday, November 23, 2011

Product Review: CCleaner


CCleaner knows what to get rid of!
Hey, everyone!  Welcome to my first product review.  I’m going to start by going over a product I love and use frequently – Piriform’s wonderful CCleaner tool.  I like it because it allows you to clean your computer of unnecessary files and gunk.  For instance, your computer makes frequent use of log files, the order your programs appear in the Start menu and what files you’ve recently opened – and these are all stored in files on your hard disc (yes, I spell ‘disc’ with a ‘c’, for reasons I’ll explain some other time).

The worst case can easily be temporary files – these babies get created all the time by Windows and by programs by use, and they aren’t easy to get rid of because they aren’t easy to find.  Often, they are created in hidden folders like AppData in your user folder (in Windows 7, that is) and aren’t removed.

CCleaner is great about this, and all you have to do is go to the main screen (Cleaner), and press Analyze (Quick Note: If you don’t have admin rights, CCleaner can only look in folders you can access as a standard user).  Then sit back, as in a few moments it will present you with an estimate of how much space it can remove.  Click Run Cleaner, then the fun starts.  CCleaner’s icon of a brush was aptly chosen, as it cleans like your virtual slave.  You can even customize exactly what you want removed:

By choosing aptly about what you want removed, you can control what you do – or don’t – want trashed.

These file cleaning features are not the extent of CCleaner’s interface, no sir!  No, CCleaner can also clean your Windows registry.  The Windows registry, for those of you who don’t know, is a huge database Windows uses to keep track of program data, including settings and file history (a good read up on it can be found on Wikipedia here, but it’s a bit technical).  However, when you install/uninstall a program, your registry can be full of crap (dare I say s***?) from entries the program wrote but didn’t erase on uninstall.

Wow, that computer has a lot of issues…
CCleaner can also be an uninstaller, allowing you to remove programs with the Uninstall option in the Tools category, but this requires admin rights.  You can customize what programs can run when your system starts up, modify/delete system restore points, and wipe the free space of a computer hard drive or thumb/USB drive.

CCleaner also has additional options, such as a whitelist, under its Options panel.  I suggest you basically check it out.  Also, you Mac geeks out there haven’t been left out: Piriform has a public beta for you OS X 10.5 to 10.7 (OS Lion) users, and is downloadable as a DMG archive at this link.
Note:  All pictures in this article are from Piriform’s website for CCleaner.  I do not own these images, and have included them because they will help illustrate the software.  If Piriform does not want these images here, drop me a line on my comments page and I’ll remove them.

Opening

Hello, World!

And what a fine world it is!  Today I’m going to discuss – in my very first blog post EVER – what I’m going to achieve by writing this blog.  First off, this blog is to entertain you.  Well, sort of, I guess.  This blog is really to discuss all kinds of tech things.  If you’re looking for that new cookie recipe, this isn’t the place.  Go find some other blog.

 

But if you want to hear about software I think is neat, new videos games I think are cool, and maybe a short discussion on why my music taste is best, then this is the blog for you.

 

Now, a little about myself.  I’m a software developer living in southern New Hampshire.  My strengths are in Java (though I know enough C and C++) and a small game engine known as Unity 3d.  Unity is an awesome game engine built for speed and can make all kinds of games, and no, I wasn’t paid to say that.  The reason Unity is my favorite is because there was a minimal learning curve and it performs well on my laptop, unlike other engines I’ve tried like UDK, and that out of the box, with the free version, it allows you to create stand-alone applications for Windows and Mac, games that can be played in a web browser using the Unity 3D Plugin, which is available for all major browsers.  But that’s enough singing Unity’s praises, if you to see more you’ll check out the website.  I know you will.

 

What are some of my ongoing projects, you ask?  Well, I’m not going to go into any detail, as there are people about just begging for an idea that they can make, so I’m only going to post completed, copyrighted projects on this blog.  Eventually I’m going to (hopefully) start a small company and give myself a website so I can allow people to buy my work.

 

I also enjoy writing.  I write small little poems and short stories for fun.  Maybe I’ll post one sometime.  You’d all like to see that, right?  Right?

 

I hope someday to get into iOS app development, i.e. for the iPod, iPhone and iPad.  That’s a huge market and a way to earn a little money, yes?  Too bad so many have already had that idea; the competition is huge.

 

Alright, that’s about it for now.  Some more posts will be coming very soon, so just wait!  Also, in the top corner of this screen, just above my logo, you can see the link to the RSS feed.  You can subscribe to this feed if you want to go be alerted of my new blog posts – which I surely hope you do.