Put Yourself In Command – with the command line
Commands enable you to do all sorts of powerful things on your computer. We’ll demonstrate this by looking at an everyday task that might be familiar to you.
If you use a digital camera, you probably have a folder full of images on your computer. Imagine you wish to resize the image profile.jpg so it is 300 pixels wide and save it as a new image called profile_small.jpg.
Using an image editing software, the steps you need to go through might look as follows:
- Open an image editor from the Applications menu.
- Click the File>Open menu item.
- Browse to the folder with your images.
- Click the image file profile.jpg and then Open.
- Click the Image>Scale Image menu item, for resizing images.
- Change the image Width to 300 pixels and click Scale.
- Click the File>Save As menu item to save the file.
- Enter profile_small.jpg as the new file Name and click Save.

Using the command line, you can achieve the same operation by typing:
convert -resize 300 profile.jpg profile_small.jpg
That’s 1 step in the command line instead of 8 steps using the graphical interface. Perhaps you think that the time you spend reading this book and studying the commands isn’t worth saving 7 steps. But what if there were 30 images to be resized. Do you still want to open each image individually and repeat the process 30 times using the image editor? That would total 240 steps that you have to go through. Wouldn’t you rather just type one command instead and get the job done?
A single command could do the same thing whether you had 30 images, 300 or 3000. This is one of the most compelling reasons to start using the command line. You might start with a slow learning curve, but in the long run, it will save a lot of time. Even more important, learning the command line will open up interesting possibilities and fun ways of working. Lets look at some more reasons why learning the command line is a good idea.
Summarizing the advantages of using commands
Many people who give the command line a try are so amazed by its possibilities that they do not even want to go back to a graphical user interface! Why? Well, in brief, the command line offers the following main advantages over common graphical software:
- Flexibility. With graphical programs you sometimes hit a limit, finding that you just can’t do what you want or need to find cumbersome work-arounds to program limits. Working on the command line, though, you can combine commands to yield a virtually infinite range of new and interesting functions. By combining commands creatively, you can make the command line do exactly what you want — it puts you in control of your computer.
- Reliability. Graphical programs are often immature or even unstable. In contrast, most of the tools that the command line offers are highly reliable. One of the reasons for this is their maturity: the oldest command line programs have been around since the late 1970s, which means that they have been tested for three decades. They also tend to work the same way across different operating systems, unlike most graphical tools. If you want a Swiss Army knife you can rely on, the command line is for you.
- Speed. Fancy graphics eat up a lot of your hardware’s resources, often resulting in slowness or instability. The command line, on the other hand, uses the computer’s resources much more sparingly, leaving memory and processing power for the tasks that you actually want to accomplish. The command line is also intrinsically faster: instead of clicking through long chains of graphical menus, you can type commands in a dozen or so keystrokes, and often apply them to multiple files or other objects. If you are a fast typist, this will enable you to drastically increase your productivity.
- Experience. Using the command line is a great learning experience. When you use the command line, you communicate with your computer more directly than with graphical programs, thus learning a lot about its inner workings: using the command line on a regular basis is the way to becoming a GNU/Linux guru.
- Fun. Once you have learned how to use this powerful tool, you will find yourself doing fun and interesting stuff that you hadn’t even thought to be possible.
Source: http://en.flossmanuals.net/CommandLineIntro/Introduction
Full Text PDF: http://tuxtraining.com/files/commandline.pdf







