grep

2006年2月8日 11点40分 没有评论

What is grep? grep is using to print lines matching a pattern.
grep syntax:
grep [options] pattern [file]
In the syntax, the pattern would be RE and strings.If the string was used,there would be double quotation marks.For including double quotations around string, we could not be confused by the string which would be considered as SHELL command if there are not quotations,and the string such as “get up” including backspace would also be recognized. When there are variables, the quotations should not be missed.

some option paramters:
-c : only print the count of matching lines per file.
-i : ignore case distinctions
-n : print line number of out lines.
-s : suppress error messages
-v : select non-matched lines.

“>” is used to accuracy matching.This is very important.

+E option supports the “AND” and “OR” matching patterns.For example,if we would to find 219 or 216, the following command is used: # grep +E ‘219|216’ testfile
Note,if there is not single quotations,just like “grep +E 219|216 testfile”.This string is considered as SHELL command, and the error messages were displayed(in Mandriva):
# grep +E 219|216 testfile
bash: 234: command not found.

Some useful commands about grep:
# ls -l | grep ‘^d’
# grep ‘username’ /etc/passwd
# ps -ax | grep “named”
This command is used to identify if the DNS server (named) had been running.
# STR = “Mary Joe Peter Paulin”
# echo $ STR | grep “Mary”
output file: Mary Joe Peter Paulin

egrep: extended grep, it is alwayed used with “-f ” option.

分类: 科技 标签:

Regular Expressions

2006年2月8日 10点46分 没有评论

The Regular Expressions is collection which include some regular or non regular characters.The following characters are listed here:
^ : only match the first character of line
$ : only match the last character of line
* : match all of the following strings
[] : match some characters, they would be declared in an identified range.For example, [0-9] means it would be match with any number from 0 to 9.
: used to specify the regular character. eg, “$” means “$” in RE.
. : match only one character.
pattern{n} : matched the lines in which pattern’s number is n.
pattern{n,}m : the least time would be m.
pattern{n,m} : match times between “n” and “m”.
eg:
dd-mm-yyyy : [0-9]{2}-[0-9]{4}-[0-9][4]
ip address: xxx.xxx.xxx.xxx
[0-9]{3}.[0-9]{3}.[0-9]{3}.[0-9]{3}

The difference between good codes and wonderful codes is depended on using RE rightly.

分类: 科技 标签:

Schedule

2006年2月4日 23点22分 没有评论

First, I think I should read more and more books to improve my ability.These books contains Economy,Computer(Hardware and Database) and some cooking documents. The reap from books is more important than the books’ number which have been read. Less time should be wasted in play games such as PES5 and FM2006 through they are so interesting. Reading makes me brightly and seeing the scene of beautiful world.Second, my oral English must get more practice. I’ve asked my litter sister,Apple to help me.We planed to do some reading and listening practise in morning.I think one hour is available. This plan needs our patience and insistence. In my spare time, some Thailand boxing will also be arranged.

分类: 科技 标签:

Spring Festival

2006年1月28日 23点15分 没有评论

It has only one hour between Chinese Spring Festival. In the same date of last year(2005), my Powerleader’s career began. During those days when I am preparing for my OCP examination, I put all my heart into those technology books. I got my certification in Nov 29th,2005.James is right,one year’s experience in Server channel is very important to me.And I found myself through Linux system: Red Hat,SuSE and Mandriva. I believe I could get more success in Linux field.

分类: 科技 标签:

How to identify boot partition

2006年1月25日 11点22分 没有评论

How to identify boot partition?
# grub
grub> find /vmlinuz
In Mandriva, the following message will be displayed: (hd0,0)

I think this command is very useful to find the boot file when system could not boot normally.

3ware 9550SX-12 has 12 SATA ports.It was added in SE7520 Alief board.The driver is the same as 9000 series.I told our guys to install Windows Server 2003 in this platform.

PT6510G2 is able to support 10 SCSI harddisk by using two 5-position modules.I’ve done such test yesterday.I mailed all our sales and suggested them to use more power platforms than BD2 which is located as value. Storage device would also be good resolution when customer want more harddisk space and keep their data safely.

分类: 科技 标签:

The Timeless Way of Building and Peopleware

2006年1月22日 21点46分 没有评论

Read more books. No time could be wasted.
Go on with the red gloves.

分类: 科技 标签:

A Fighter’s Blues

2006年1月22日 19点49分 没有评论

There are two good songs in this film: “When I meet you” and “smile”.

Andy Lau turns in his finest performance in this entertaining drama about Tiger (Lau), a kickboxer who is released from prison and finds redemption. The film begins as he’s released from prison, but we’re introduced to his demons in flashback. When he was a young boxer, he fell for Thai filmmaker Pim (Indhira Jaroeupura of the film Nang Nak). She was his number one love, though he apparently forgot what drew her to him. She was drawn to his strength and his fighting nature. When she discovers that boxing is only a job to him, he loses her and something else happens that lands him in jail for 10+ years.

In the present he meets Sister Mikoto (Takako Tokiwa, in her second Hong Kong film), who has occasionally looked after Tiger’s wayward daughter Ploy (Apichaya Thanatthanapong). Though their reunion is difficult at first, they eventually find some semblance of a father-daughter relationship. Still, Tiger’s demons return to haunt him, and when we see exactly what they were, everything comes together in an appropriate and even haunting fashion.

Plot is not particularly important in this movie. The film is essentially about Tiger and his growth as a man, which overshadows any need for your standard three-act storytelling. Some might feel that Tiger’s final decisions are difficult to swallow as they smack of overly dramatic storytelling, but Lau makes the whole thing watchable and compelling. This is probably his best acting, outdistancing his best actor turn in Running Out of Time. Tiger is an opaque role with real depth, and Lau turns in a dark, layered performance. While her character needs just a bit more fleshing out, Takako Tokiwa is again outstanding and beautiful. This is entertaining and even beautiful ride, again showing that Daniel Lee is one of Hong Kong’s most competent commercial directors.

分类: 科技 标签:

Instructions For Life

2006年1月21日 11点30分 没有评论

Share your knowledge. It’s a way to achieve immortality.

分类: 科技 标签:

Update working notes

2006年1月19日 16点54分 没有评论

Chengdu, SE7501WV2 board in 2300RGII makes big noise:

At first, the customer service engineer reflashed the latest BIOS and FRU/SDR, these machines were running without much noise. For some reason, the customer shutdown all these servers after they had been working two weeks. However, these machines made big noise again when they were power on in the third week. Our engineer went to reflashed the BIOS and FRU/SDR, it seemed to do helpless for decreasing the sound.

I think there are three condition in which this issue could be taken place. As we all know, big noise is made by fans which is running fasted. Then, first we could just imagine there had been one of these fans stopped.so other fans ran in higher speed to make the system in general working temparature.Second,the environment where these servers were located is hot, and the final one may be FRU/SDR reflashed is not suited for the platform. For example, the chassis has thress fans,and the FRU/SDR configuration is set to four.
This issue is still open.I’m waiting for SEL file from customer.

RAID / hotplug test:

The test platform is PR2510 with two SCSI harddisk configurated as RAID 1. I installed Windows Server 2000, and then plug one harddisk. The system was still running as normal with sharp alert.Then I created a new file in current Windows, and placed the harddisk back, the alter voice still exist.When I reboot the computer, press CTRL+G , I could see the former offline harddisk were rebuilding automaticly.
It took about 4 hours to rebuild the system which capacity is 6GB.

How could we save the information when the RAID is offline? In most cases, a memory with BUU(battery) is able to increase the RAID security. And if the operating system is in computing status (writing data and executing program), the RAID is always unavailable.

Shanghai, BlackICE server protection is one of firewall productions for Windows OS.
The BOM of x510 and x510g2 had been updated in Dem 16th, 2005. I’ve inserted some new CPU,memory and harddisks.

分类: 科技 标签:

mount Windows shared directory to Mandriva

2006年1月18日 15点03分 没有评论

In Nov 21st,2005, I wrote if using the following command in SuSE 9.1 professional to mount a windows shared directory:
# mount -t smbfs -o username=phillip,password=aaa //192.168.1.143/shared_directory /mnt/temp
There will be an error information displayed. After modified this command:
# mount -t smbfs -o username=phillip,password=aaa //computer_name/shared_directory /mnt/temp
The windows shared directory would be mount to SuSE successfully.

It’s strange in Mandriva 2006.
First, I used the computer’s name to mount:
# mount -t smbfs -o username=phillip, password=aaa //computer_name/shared_directory /mnt/temp
the following information was showed:
6502: Connection to test failed
SMB connection failed.

Since the SMB service is running well in Mandriva, how could this happen?
Then, I tried the IP address instead of computer’s name:
# mount -t smbfs -o username=phillip,password=aaa //192.168.1.143/shared_directory /mnt/temp
As the resule, the windows directory was mounted successfully and I could read and write it.

分类: 科技 标签: