In HPUX, we use LP command to print text file, for example
lp -dprt1 printme.txt, where
prt1 is the LP destination name (or also known as queue name) and
printme.txt is the file to be printed.
If the print server used is a HP JetDirect, we can set the printout header using the HPPI utility:
- Install the HP JetDirect Installer (in HPUX 11iv3, the installation file is named as
- Then copy
- Run HPPI (HP Printer Installer) by typing
- Select option 1 (Spooler Administration) then option 1 again (Add printer to local spooler).
- Type in print server IP address.
- Type in the LP destination name (option 1) then select option 5 (additional printer configuration).
- Type in hp2560 in Model Script (option 1, there is actually a list of model script for you to select but you won’t find hp2560 in the list) then continue for the rest.
- Finally you can find a file named exactly like the queue name in
/etc/lp/interface/model.orig. You can add or modify a function called
do_banner() in order to add a customized printout header.
Below is a list of TAR and CPIO command integrated with REMSH command in order to remote access tape drive in another HPUX server. Refer Tar and Untar tape drive in another HPUX server to setup the server before try the commands below.
- CPIO into tape:
find /dir/or/files/to/cpio -print | cpio -oacvB | remsh OLDSERVER 'dd of=/dev/rmt/0m bs=64b'
- Verify CPIO tape:
remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (cpio -itcvB)
- CPIO from tape:
remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (cpio -iacvBdum)
- TAR into tape:
(tar -cvfb - 64
) | remsh OLDSERVER 'dd of=/dev/rmt/0m bs=64b'
- Verify TAR tape:
remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (tar -tvfb - 64)
- UNTAR from tape:
remsh OLDSERVER 'dd if=/dev/rmt/0m bs=64b' | (tar -xvpfb - 64)
In my last post, I have recommended to use Firebird as database of standalone application. While to access or administrate the database, we can use tools like Flamerobin. However we need to do something before can use the tools:
- Download Flamerobin from its website, I recommend to download the zip version.
- Download Firebird database embedded edition (zip file as well) from its website if not yet.
- Extract Flamerobin into a directory, then extract the following files to the same directory from the firebird database zip file:
- Execute Flamerobin by double click flamerobin_ansi.exe or flamerobin_unicode.exe (which ever).
- You can see a tree directory with a localhost node. If you are running a server edition database, you straight away connect the database by adding new database. But if you are using embedded edition, you need to right click on the locahost node, click server registration info and clear off the hostname field.
Choices of database in doing a standalone application always limited to me. Some people might use MYSQL, MSSQL or even Oracle as database, but to me:
- It is not logical to use a server based database for a standalone application
- You will need to install the database in order to deploy the application, where some settings might not understandable to non technical personnel.
So all the while I am using MS Access as database for standalone application, but still you need to install Microsoft Data Access Components (MDAC) if the PC you deploy doesn’t have MS Access or Office installed.
But now I am using Firebird as database, which you don’t need to install the extra stuffs, just copy over the whole folder to finish the deployment (Literally standalone). Here are some guidelines to use Firebird in .Net:
- Go to Firebird website and download 2 things: database embeded edition (which is in zip format) and .Net FirebirdClient library (in zip format as well).
- Extract following files from the database zip file to your project folder (under bin\debug or bin\release):
- Extract FirebirdSql.Data.FirebirdClient.dll to your project folder (under bin\debug or bin\release).
- Add reference of FirebirdClient to your project, and you can start using it.
- The methods to use FirebirdClient more or less is the same as other Data class, while the connection string is:
Some SMTP server allow you to send anonymous email (or even fake email), by using telnet. Telnet is available in both Windows and Linux.
- In your command prompt or terminal, issue following command:
telnet smtp_server port
smtp_server is either IP address or URL of the server, while port is the SMTP port of the server. The port normally is 25, but the server admin can change it to other number. Following is a example,
telnet smtp.servername.com 25
- After login (if success), it will show a 220 something message without any prompt sign. Just type the following command and enter:
domain_name is the host name of the server.
- Type in following command to set sender’s email address (any address, exists or not exists).
mail from: sender_email
- Type in following command to set recipient’s email address.
rcpt to: recipient_email
- Type in following command to trigger the starting of a message. This means you can start typing your message after this command.
- When the message is finished, type . (single dot) to end the message and email will be sent out.
quit to logoff.
Aware that any typing error (and backspace for correction) might result a command syntax error.