split shell script


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web
You know there are split (binary) program under linux that can split your file (binary or text) into some file with option you can pass to. I am not going to discuss it. and to combine them you can use cat program, I am not going to discuss it either. but you can search the google how to use split and combine the splitted file with cat.

And now my problem is I need to split a file then combine them using the same option over and over which make me bored. That''s why I created this small shell script which split the file, remove the file and automatically create another shell script to combine the splitted file.

The script will split the input file into smaller file (1 MB each) in this case so I can copy the file into floppy disk, you can change the split parameter on this line:
split -d -b 1000000 $1 $1.
I assume 1MB is 1 million byte to change it just change 1000000 with other number you want.
usage example:
$ ./xsplit.sh myfile.tar.gz
then it will create the following file
myfile.tar.gz.00
myfile.tar.gz.01
myfile.tar.gz.02
..
myfile.tar.gz.99
joinmyfile.tar.gz.shx
myfile.tar.gz.md5

myfile.tar.gz.00 until myfile.tar.gz.99 is the splitted file. myfile.tar.gz.md5 is the md5sum of the original file which needed for checking the integrity of the file after combined. joinmyfile.tar.gz.shx is the shell script for combining file myfile.tar.gz.00 until myfile.tar.gz.99

To join those file run
$ ./joinmyfile.tar.gz.shx

Below is the script:



[ more.. ]


Configuring Tape Drive Compaq SDT 10000 on Compaq DL 380G2 under CentOS 4


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web

1. First you must install the server with the OS (daagh...) my choice is CentOS 4.3 yet you can install it with CentOS 3.6 (or similar version of RHEL or other RHEL source-compiled distro like WBEL/TAO)

2. Connect the Tape Drive scsi connector to server and it''s power cable.

3. Change file /etc/redhat-release became like this:

Red Hat Enterprise Linux AS release 4 (Nahant)

4. Download the appropriate storage-driver for your server type from HP.com, there you can download storage driver for your server type not just DL380G2. After that select the appropriate OS (many choices - I choose RHEL 4 x86)

The Driver name''s is:

HP ProLiant Smart Array Controller (x86/AMD32) Driver for Red Hat Enterprise Linux 4 (x86)

And the driver filename is:

cpq_cciss-2.6.10-13.rhel4.i686.rpm

To install the driver type:

# rpm -ivh cpq_cciss-< version >.rhel4.i686.rpm

Setup is now complete. Please REBOOT your computer NOW!!

To upgrade the driver type:

# rpm -Uvh cpq_cciss-< version >.rhel4.i686.rpm

Upgrade is Now Complete. Please REBOOT your computer NOW!!

NOTE: If the installation fails or if you see any warning or error messages, STOP, do NOT reboot the computer. The driver will not be operational and you must uninstall the driver by typing the following command:

# rpm -e cpq_cciss-< version >

The removal of the RPM restores the original cciss.o module, and builds a new initrd image with the previous driver object module (if any) and adds yet another grub or lilo entry. You can then boot using this newest lilo or grub entry, (provided the building of the new initrd image goes well), or your original lilo or grub entry.

If you install/upgrade you''ll find new entry on grub/lilo, choose that.

5. check on file /proc/scsi/scsi, something like this will displayed:

Attached devices:

Host: scsi0 Channel: 00 Id: 00 Lun: 00

Vendor: COMPAQ Model: SDT-10000 Rev: 1.16

Type: Sequential-Access ANSI SCSI revision: 02

6. now for tape software I used taper version 7.0pre-1 which alpha version but I have tested it''s working properly. the previous version used previos gcc library which not installed on CentOS 4.

for taper info and download follow the link here

nb: remember always to turn on the tape drive first before the server because the kernel need to check what peripheral connected to the system




Wikipedia:Enabling East Asian characters


 BlinkList   del.icio.us   digg   Furl   linkaGoGo   Newsvine   reddit   Shadows   Simpy   Spurl.net   Tailrank   Yahoo! My Web

I was wonder why my latest firefox can''t display japanes/korean/chinese language under Fedora Core 4.

After googling-around, I found this how to on Wikipedia

yum install fonts-japanese fonts-chinese fonts-korean

execute the command above as root, re-login at the system, walah.... Now I can see japanese/chinese/korean language using firefox on fc4

yummy....

let''s learn japanese/chinese/korean language now....

uhui...




Page :  1