A Couple of Other Biters You ll Be Using Soon

 < Day Day Up > 



A Couple of Other Biters You’ll Be Using Soon

This is as good a place as any to introduce yet two more commands that you will be called upon to use in this chapter and elsewhere in the book: rpm and ln. You needn’t practice with these yet, as you will be using them very soon, but you might as well know what they are all about.

$ ln

The ln (link) command is used to create a link file that launches or activates another file located in a separate folder. This is very useful when trying to activate a file that is buried deep in the subfolder of a subfolder of a subfolder somewhere on your hard disk. The command is very often used with the -s(symbolic) flag, which provides essentially the same thing as the “shortcut” you’ve come to know in Windows, or the “alias” on the Mac.

The easiest way to use the ln command is to first use the cd command to change the Terminal’s location to the folder where you want to place the link. Then you can type the ln command on the command line, followed by the path of the file you wish to link to. For example, let’s say that you wanted to put a link in your Home folder for an OpenOffice.org Writer file of the autobiography you’ve been writing, called myLife.sxw. The file is pretty well buried in a nest of subfolders deep within your user’s Home folder: /home/username/Documentia/personal/self/autobiography/myLife.sxw. To create the link, you would open a new Terminal window, type in the following command string, and then press ENTER:

ln -s Documentia/personal/self/autobiography/myLife.sxw

Once you are finished, the link will appear in your Home folder as an icon matching the original file in terms of appearances, albeit sporting a green arrow to signify that it is a link.

# rpm

As you might have guessed on your own, the rpm command is used to install RPM files. Of course, you can do this through simple mouse clicks alone, but sometimes the command-line alternative can be quite useful. As the rpm command usually requires the system to write to files that can only be written to by root, you must first become root in order to use it for installation. That is why there is a # sign before the command in the heading.

As with most commands, rpm can be used in conjunction with flags. In fact, the most commonly used command and flag combination for this command is rpm -Uvh. There are actually three flags used together in this case: U, v, and h. When using more than one flag simultaneously, the flags are written together after the hyphen (-Uvh, not -U -v -h).

The U (update) flag either installs a file anew or updates a previously installed version of the same file, depending on whether or not a version of the file exists on the system. Thus, if you are trying to install a file called dog-1.0.2, and your system already has a file called dog-1.0.1, the U flag tells the rpm command to update that file. If there is no such dog file on your system, the U flag merely tells the rpm command to install it. The second flag, v (verbose), tells the rpm command to give you a progress report of what is going on. The last flag, h(hash), tells the command to use hash marks (###) as the means by which to indicate that progress — a sort of Terminal version of the progress bar.



 < Day Day Up > 



Linux for Non-Geeks. A Hands-On, Project-Based, Take-It-Slow Guidebook
Linux for Non-Geeks: A Hands-On, Project-Based, Take-It-Slow Guidebook
ISBN: 1593270348
EAN: 2147483647
Year: 2003
Pages: 188

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net