Archive for the 'Tomcat' Category

Using the Bash Shell140Typing less with automatic command (X web hosting)

Friday, July 13th, 2007

Using the Bash Shell140Typing less with automatic command completionMany commands take a filename as an argument. To view the contents of the/etc/modprobe.conftext file, for example, type the following command: cat /etc/modprobe.confThe catcommand displays the /etc/modprobe.conffile. For any com- mand that takes a filename as an argument, you can use a Bash feature toavoid having to type the whole filename. All you have to type is the bareminimum just the first few characters to uniquely identify the file in itsdirectory. To see an example, type cat /etc/modbut don t press Enter; press Tabinstead. Bash automatically completes the filename, so the commandbecomes cat /etc/modprobe.conf. Now press Enter to run the command. Whenever you type a filename, press Tab after the first few characters of thefilename. Bash probably can complete the filename so that you don t have totype the entire name. If you don t enter enough characters to uniquely iden- tify the file, Bash beeps. Just type a few more characters and press Tab again. Going wild with asterisks and question marksYou can avoid typing long filenames another way. (After all, making less workfor users is the idea of computers, isn t it?) This particular trick involves using the asterisk (*) and question mark (?) and a few more tricks. These special characters are called wildcardsbecausethey match zero or more characters in a line of text. If you know MS-DOS, you may have used commands such as COPY *.* A:tocopy all files from the current directory to the A drive. Bash accepts similarwildcards in filenames. As you d expect, Bash provides many more wildcardoptions than the MS-DOS command interpreter does. You can use three types of wildcards in Bash: .The asterisk (*)character matches zero or more characters in a file- name. That means * denotes all files in a directory. .The question mark (?)matches any single character. If you type test?, that matches any five-character text that begins with test. .A set of characters in bracketsmatches any single character from thatset. The string [aB]*, for example, matches any filename that startswith aor B.
Looking for affordable and reliable webhost to host and run your business application? Then look no more and go to servlet web hosting services.

ShellUsing the Bash Shell139Saving command output in a (Web hosting colocation)

Friday, July 13th, 2007

ShellUsing the Bash Shell139Saving command output in a fileTo save the output of a command in a file, redirect the standard output to afile. For example, type cdto change to your home directory and then typethe following command: grep typedef /usr/include/* > typedef.outThis command searches through all files in the /usr/includedirectory for the occurrence of the text typedef and then saves the output in a filecalled typedef.out. The greater-than sign (>) redirects stdoutto a file. Thiscommand also illustrates another feature of Bash. When you use an asterisk(*), Bash replaces the asterisk with a list of all filenames in the specified direc- tory. Thus, /usr/include/*means all the files in the /usr/includedirectory. If you want to append a command s output to the end of an existing fileinstead of saving the output in a new file, use two greater-than signs (>>) likethis: command >> filenameSaving error messages in a fileSometimes you type a command and it generates a whole lot of error mes- sages that scroll by so fast you can t tell what s going on. One way to see allthe error messages is to save the error messages in a file so that you can seewhat the heck happened. You can do that by redirecting stderrto a file. For example, type the following command: find / -name COPYING -print 2> finderrThis command looks throughout the file system for files named COPYING, but saves all the error messages in the finderrfile. The number 2followedby the greater-than sign (2>) redirects stderrto a file. If you want to simply discard the error messages instead of saving them in afile, use /dev/nullas the filename, like this: find / -name COPYING -print 2> /dev/nullThat /dev/nullis a special file often called the bit bucketand sometimesglorified as the Great Bit Bucket in the Sky that simply discards whatever itreceives. So now you know what they mean when you hear phrases such as, Your mail probably ended up in the bit bucket.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

Web hosting solutions - Using the Bash Shell138changes the current directory to

Friday, July 13th, 2007

Using the Bash Shell138changes the current directory to your home directory, lists the contents ofthat directory, and then shows the name of that directory. Combining shell commandsYou can combine simple shell commands to create a more sophisticatedcommand. Suppose you want to find out whether a device file named sbpcdresides in your system s /devdirectory because some documentation saysyou need that device file for a Sound Blaster Pro CD-ROM drive. You can usethe ls /devcommand to get a directory listing of the /devdirectory andthen browse through it to see whether that listing contains sbpcd. Unfortunately, the /devdirectory has a great many entries, so finding anyitem that has sbpcdin its name may be hard. You can, however, combine thelscommand withgrepand come up with a command line that does exactlywhat you want. Here s that command line: ls /dev | grep sbpcdThe shell sends the output of the lscommand (the directory listing) to thegrepcommand, which searches for the string sbpcd. That vertical bar (|) isknown as a pipebecause it acts as a conduit (think of a water pipe) betweenthe two programs the output of the first command is fed into the input ofthe second one. Controlling command input and outputMost Linux commands have a common feature they always read from thestandard input (usually, the keyboard) and write to the standard output(usually, the screen). Error messages are sent to the standard error (usuallyto the screen as well). These three devices often are referred to as stdin, stdout, and stderr. You can make a command get its input from a file and then send its output toanother file. Just so you know, the highfalutin term for this feature is inputand output redirectionor I/O redirection. Getting command input from a fileIf you want a command to read from a file, you can redirect the standardinput to come from that file instead of the keyboard. For example, type thefollowing command: sort < /etc/passwdThis command displays a sorted list of the lines in the /etc/passwdfile. Inthis case, the less-than sign (<) redirects stdinso that the sortcommandreads its input from the /etc/passwdfile.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.

ShellUsing the Bash Shell137The shell uses a blank (Web hosting resellers)

Friday, July 13th, 2007

ShellUsing the Bash Shell137The shell uses a blank space or tab to distinguish between the command andoptions. Naturally, you help it by using a space or a tab to separate the com- mand from the options and the options from one another. An option can contains spaces all you have to do is put that option insidequotation marks so the spaces are included. For example, to search for myname in the password file, I enter the following grepcommand (grepis usedfor searching for text in files): grep Naba Barkakati /etc/passwdWhen grepprints the line with my name, it looks like this: naba:x:500:500:Naba Barkakati:/home/naba:/bin/bashIf you created a user account with your username, type the grepcommandwith your username as an argument. In the output from thegrepcommand, you can see the name of the shell(/bin/bash) following the last colon (:). The number of command-line options and their format, of course, dependson the actual command. Typically, these options look like -X, where Xis asingle character. For example, the lscommand lists the contents of a direc- tory. You can use the -loption to see more details, such as this: [ashley@dhcppc4 ashley]$ ls -ltotal 8drwxrwxr-x 2 ashley ashley 4096 Jun 29 13:35 Directorydrwx—— 7 ashley ashley 4096 Jun 29 11:44 MailThe [ashley@dhcppc4 ashley]$part is the shell prompt for the usernamed ashley. On your system, the prompt depends on your username. When showing examples, I omit the prompt. If a command is too long to fit on a single line, type a backslash followed byEnter. Then, continue typing the command on the next line. For example, type the following command (press Enter after each line): cat /etc/passwdThe catcommand then displays the contents of the /etc/passwdfile. You can concatenate several shorter commands on a single line. Just sepa- rate the commands by semicolons (;). For example, the following commandcd; ls -l; pwd
We recommend cheap and reliable webhost to host and run your web applications: Coldfusion Web Hosting services.

Using the Bash Shell136To get to (Email web hosting) the first

Thursday, July 12th, 2007

Using the Bash Shell136To get to the first virtual console from the GNOME or KDE desktop, pressCtrl+Alt+F1. Press Ctrl+Alt+F2 for the second virtual console, and so on. Eachof these virtual consoles is a text screen where you can log in and type Linuxcommands to perform various tasks. When you re done, type exitto log out. You can use up to six virtual consoles. The seventh one is used for the GUIdesktop. To get back to the GUI desktop, press Ctrl+Alt+F7. Using the Bash ShellIf you ve used MS-DOS, you may be familiar with COMMAND.COM, the DOScommand interpreter. That program displays the infamous C:>prompt. In Windows, you can see this prompt if you open a command window. (Toopen a command window in Microsoft Windows, choose Start.Run, typecommandin the text box, and then click OK.) Fedora Core comes with a command interpreter that resembles COMMAND. COMin DOS, but can do a whole lot more. The Fedora Core command inter- preter is called a shell. The default shell in Fedora Core is Bash. When you open a terminal windowor log in at a text console, the Bash shell is what prompts you for commands. Then, when you type a command, the shell executes your command. By theway, just as there are multiple GUIs (GNOME or KDE) for Fedora Core, youhave the choice of shells besides Bash. For example, the C Shell is an alter- nate shell that some people prefer. You can easily change your default shellby typing the chshcommand. In addition to the standard Linux commands, Bash can execute any com- puter program. So you can type the name of an application (the name is usu- ally more cryptic than what you see in GNOME or KDE menus) at the shellprompt, and the shell starts that application. Learning the syntax of shell commandsBecause a shell interprets what you type, knowing how the shell processesthe text you enter is important. All shell commands have this general formatthat starts with a command followed by options (some commands have nooptions): command option1 option2 … optionNSuch a single on-screen line of command is commonly referred to as a com- mand line. On a command line, you enter a command, followed by zero ormore options (or arguments). These strings of options the command-lineoptions(or command-line arguments) modify the way the commandworks so you can get it to do specific tasks.
Visit our web design programs services for an affordable and reliable webhost to suit all your needs.

Web hosting unlimited bandwidth - Chapter 2: Learning the ShellIn This Chapter Opening

Thursday, July 12th, 2007

Chapter 2: Learning the ShellIn This Chapter Opening terminal windows and virtual consoles Using the Bash shell Learning some Linux commands Writing shell scriptsSometimes things just don t work. What do you do if the GUI desktopstops responding to your mouse clicks? What if the GUI doesn t start atall? You can still tell your Fedora Core system what to do, but you have todo it by typing commands into a text screen. In these situations, you workwith the shell the Linux command interpreter. I introduce the Bash shell(the default shell in Fedora Core) in this chapter. After you learn to work with the shell, you may even begin to like the simplicityand power of the Linux commands. And then, even if you re a GUI aficionado, someday soon you may find yourself firing up a terminal window and makingthe system sing and dance with two- or three-letter commands strung togetherby strange punctuation characters. (Hey, I can dream, can t I?) Opening Terminal Windows and Virtual ConsolesFirst things first. If you re working in GNOME or KDE, where do you typecommands for the shell? Good question. The easiest way to get to the shell is to open a terminal (also called console) window. Both GNOME and KDE panels have an icon to open a terminalwindow, which looks like a monitor. Click that icon to get a terminal window. Now you can type commands to your heart s content. If, for some reason, the GUI seems to be hung(you click and type but noth- ing happens), you can turn to the virtual consoles. (The physical console isthe monitor-and-keyboard combination.) The idea of virtual consoles is togive the ability to switch between several text consoles even though youhave only one physical console. Whether you are running a GUI or not, youcan then use different text consoles to type different commands.
From our experience, we can recommend PHP5 Web Hosting services, if you need affordable webhost to host and run your web application.

Exploring KDE1343.Pick one of the image files from (Apache web server for windows)

Thursday, July 12th, 2007

Exploring KDE1343.Pick one of the image files from the list of files, and then click OK. 4.When you get back to the Control Center window, click Apply to putthe new change into effect. 5.If you want to configure other aspects of the KDE desktop, selectanother item in the Appearance & Themes list (refer to Figure 1-22) and give it a try. Click Apply to try a new configuration; if you don t like the result, clickReset to revert to the old settings. Figure 1-23: Select animage fromthis dialogbox. Figure 1-22: Change abackgroundcolor orpicture fromthis window.
If you are looking for affordable and reliable webhost to host and run your business application visit our ftp web hosting services.

DesktopsExploring KDE133The Control Center window is (Adelphia web hosting) vertically divided

Wednesday, July 11th, 2007

DesktopsExploring KDE133The Control Center window is vertically divided into two parts: .The narrower left window shows a tree menu with 10 or so top-level cat- egories of customization that you can perform. .The wider right window is where you enter information. To customize a specific category such as Appearance & Themes, click theplus sign (+) to the left of the label. The plus sign changes to a minus sign( ), and you get a list of all the items that you can specify. For example, tochange the KDE desktop s background from the window shown in Figure1-21, do the following: 1.Click the plus sign next to Appearance & Themes; from the new itemsthat appear, click Background. The Control Center displays the choices for desktop background, usingthe right window as shown in Figure 1-22. You can select a backgroundcolor or wallpaper(an image used as background) for your desktop here. 2.To select a picture as background, select Picture and then click thebutton with the folder icon, next to the name of the current picture. The Control Center brings up a dialog box (shown in Figure 1-23) show- ing the contents of the /usr/share/backgrounds/imagesdirectory. Figure 1-21: You canconfigurethe KDEdesktopfrom theKDE ControlCenter.
Searching for affordable and reliable webhost to host and run your web applications? Go to our java web server services and you will be pleased.

Exploring KDE132 .Create a new folder:Choose View View Mode Icon (Yahoo free web hosting)

Wednesday, July 11th, 2007

Exploring KDE132 .Create a new folder:Choose View View Mode Icon View. Then right- click an empty area of the rightmost window and choose CreateNew.Directory from the pop-up menu. Then type the name of the newdirectory and click OK. (If you don t have permission to create a direc- tory, you get an error message.) Viewing Web pagesKonqueror is much more than a file manager. With it, you can view a Webpage as easily as you can view a folder. Just type a Web address in theLocation box and see what happens. For example, Figure 1-20 shows theKonqueror window after I typed www.irs.govin the Location text box onthe toolbar and pressed Enter. Konqueror displays the Web site in the window on the right. The left windowstill shows whatever it was displaying earlier. Configuring KDEYou can configure the KDE desktop in many ways, but I use the KDE ControlCenter for one-stop-shopping KDE configuration. Choose Main Menu. Settings.Control Center. The Control Center starts and shows summaryinformation about the Fedora Core system in a window (see Figure 1-21). Figure 1-20: Konquerorcan browsethe Web aswell.
You want to have a cheap webhost for your apache application, then check apache web hosting services.

DesktopsExploring KDE131For example, click the Modified column heading, (Http web server)

Wednesday, July 11th, 2007

DesktopsExploring KDE131For example, click the Modified column heading, and Konqueror displays thelist of files and folders sorted according to the time of the last modification. Clicking the Name column heading sorts the files and directories alphabeti- cally by name. Not only can you move around different folders using Konqueror, you canalso do things such as move a file from one folder to another or delete a file. I don t outline each step because the steps are intuitive and similar to whatyou do in any GUI (such as Windows or the Mac interface). Here are somethings you can do in Konqueror: .View a text file: Click the filename and Konqueror runs the KWrite wordprocessor, displaying the file in a new window. .Copy or move a file to a different folder:Drag and drop the file s iconon the folder where you want the file to go. A menu pops up and asksyou whether you want to copy, move, or simply link the file to thatdirectory. .Delete a file or directory:Right-click the icon, and select Move to Trashfrom the pop-up menu. To permanently delete the file, right-click the Trashicon on the desktop, and choose Empty Trash from the pop-up menu. Ofcourse, do this only if you really want to delete the file. If you want torecover a file from the trash, double click the Trash icon on the desktopand from that window drag and drop the file icon into the folder whereyou want to save the file. When asked whether you want to copy or move, select Move. You can recover files from the trash until the moment youempty the trash. .Rename a file or a directory:Right-click the icon, and select Renamefrom the pop-up menu. Then you can type the new name or edit theoldname. Figure 1-19: Konquerorshows adetailed listview of the/etc/X11directory.
If you are in need for cheap and reliable webhost to host your website, we recommend http web server services.