Saturday, October 23, 2010

CEO Jun Tang gold: from small employers to the first professional manager


In China, by "working" and fame, the number of not more than, Jun Tang is one of the very conspicuous one. From Microsoft China president to the grand president, Tang Jun 10 million annual income, net worth billions of dollars, famous at home and abroad, he was not without pride of their hearts: the others I have, my career is very perfect, very few people can be like me!

The first project

Jun Tang first project involved, and the whole family together, his hands in his hometown, built a two story house.

In 1962, Tang Jun was born in the small town of Changzhou, Jiangsu, have a brother, a younger brother under. Parents fear that no place three sons grew up to marry a wife and child just in high school when they started planning to build a house.

Tang Jun 12-year-old on the junior high school, home construction has officially begun. "From grade to grade, a full two years, I basically did not go to school, are at home when the child build a house." Jun Tang recalls those days miserable, the house almost all the materials needed are a few four brothers collected from the.

"Two days of final exam, took 20 a few minutes, then the Cultural Revolution Fortunately, we do not go to school, fill up three days of back to school, soon to become the first of the."

This is the first large project, it has become today Jun Tang to the most profound memories of childhood. "Now what the house is still very strong!" The house was eventually used. 1980, Jun Tang admitted to the Beijing University of Posts and Telecommunications. At that time, Beijing University of Posts and Telecommunications has not so popular as today, Jun Tang reported that the first choice Fudan physics, no one thought of the language usually results in very good shape Tang Jun, when actually took a college entrance examination 59 hours total score although the over, but Fudan University in the beginning of the year that: any one who will not admit failure!

"The problem in writing, the requirement is to write an argumentative essay, I have to write a narrative, and it accounted for 40 points in writing an estimated loss of a lot of points." Today, Jun Tang to the memory of that year's essay questions still remain New. "Title called" drawing of an egg "." Eggs do not draw well, barely came to Tang Jun Department of Physics, Beijing University of Posts and Telecommunications.

Small business owner



May 26, Shanda president Jun Tang reporter's exclusive interview in Beijing.



Jun Tang

Did not the ideal school, some of the decadent Tang Jun, University of years, average scores until the third grade understanding of a fiber-optic communications school girls, in the later Tang and his wife's help, Jun Tang began to exert ourselves to minor optical fiber communication, one year actually admitted to the profession after the overseas graduate students. 1985, Jun Tang Going Fuso study.

Japan in five years, Tang Jun in the academic, career, both in the doldrums, I'm more casual small inventions, brought some luster to life. "I like music, can play several musical instruments, like singing, then Kara OK is the rise of Japan, is very clever, I studied voice signal processing, the two sides together, they designed a 'Kara OK scoring system' . "Jun Tang's own patented design, this small patent was eventually bought by Samsung with 80 thousand dollars. "Now what the domestic 'Malata', estimated to still use that technique too!"

In 1990, Ben Tang Jun transfer from Japan to the United States to continue to PhD. Rely on smaller funds to sell the patent, Jun Tang began to try their own businesses and became a small business. Among them, there are well documented, including 1993 Jun Tang set up a "double eagle software company." After he set up the "Hollywood Entertainment", but not strength Toupai film, the main income of the organization to the United States a number of domestic actors moonlighting. Said Jiang Kun, Hou Yuewen biggest names have been so had he recruited. Still later, Jun Tang has started a migration service, called "the first U.S. immigration office." But a "prominent" business name, and not to bring corresponding revenue Tang Jun, a few small businesses have always grow up, Jun Tang only to small entrepreneurs in the United States of America as mixed. But in Japan, invented a "marriage matching machine", attracted the attention of Microsoft, to bring a turning point in his life. Upon receipt of a call from Microsoft after the two recruitment, Jun Tang decided to close for the busy small business owners to live without. 1994 Jun Tang into Microsoft headquarters, as a general technician, he gave his reasons: to study for two years large companies, will press on their own.

Microsoft years

Jun Tang has been assigned to the Windows NT development team as a programmer, and Microsoft, like tens of thousands of engineers, tens of thousands of dollars annual salary. Love to play and little creative Tang Jun, the good habits into the Microsoft. At that time, Microsoft is promoting Windows operating system worldwide, countries with different languages, many of the source code based on the need to rewrite the English version, Microsoft, brought together more than 300 development team. Even so, the Chinese products are still to be delayed six months after the English version to market.

Jun Tang joined Microsoft a few months, secretly decided to change the status of such duplication of efforts, so spare time at home to re-design of software architecture, the preparation of the tens of thousands of lines of code, after the success of your test, get the boss before. After 3 months, Jun Tang's program was accepted by Microsoft's headquarters, 300 were compressed into the translation team, dozens of people, Don joined Microsoft a year later I also quickly promoted as a "development manager" salary has gone up.

"Although only a programmer, but you still want to boss the sake of discovery, nor is it enough to raise with the boss, the best is to first survey, go to the boss with a solution." Is not a boss will not like Jun Tang such employees.

The end of 1997, Microsoft began to look toward the development of China, has developed any Microsoft Windows NT Tang Jun, senior manager, volunteered to return to China to set up technical support centers in Greater China.

After 3 months, Technical Centre started functioning. After 6 months, technology centers operating indicators of the top five ranked Microsoft's first technical support center, Tang Jun, president won the Bill Gates Award of Excellence. This is the highest honor within Microsoft. Year later in July 1999, China Center was officially promoted to Asia Technical Center, in October 2001, the Asian Technology Center upgraded to Microsoft's global technology center. Four years, Tang Jun successful completion of the "triple jump."

March 2002, Tang Jun as president of Microsoft China, the annual salary at 10 million yuan.

Shanda two years

Difficult to imagine a professional managers at the time to move on, new and old club actually to jointly host a grand welcome and send off ceremony, but such a dramatic scene in February 2004 appeared in the Tang Jun body. In two years as president of Microsoft China, the need for internal adjustment as Microsoft, Jun Tang early "retirement" transfer "honorary president for life", and switch to local businesses as president of Shanghai Shanda.

Office the same day, Tim Chen, vice president of Microsoft's global, grand chairman Chen Tianqiao both came forward, held a strong happy to "quit the ceremony." Such treatment, unique in the domestic circle manager. Jun Tang, after the grand entry into the special treatment, it is coveted by peers for the manager.

A few months later as president of Shanda, Tang Jun will single-handedly responsible for the world's largest online games operator Shanda business full listing roadshow, according to the contract and the grand, Jun Tang has more than 260 million shares of Shanda stock options, exercise price for the issue price of 11 U.S. dollars. Just six months, a grand stock actually soared to 40 dollars up and down, the figure of Tang Jun potential value of options owned by hundreds of millions of yuan. Because of this, Tang Jun is commonly known as "China's first professional manager," never seen an employee, as he can earn so much!

"Own business done before, the world's best companies I have done it, I've held technical, sales I done it, head of regional management and I done it. Into the grand two years, I have experienced the process of listing, local businesses and I understand the situation. the meaning of life is to experience more than one, I think my career is very successful professional managers, as few people come with me! "Jun Tang told reporters that emotion.

鈻?Gold CEO questions

Hard work will be successful

1. Do you think his biggest talent is what?

First, it is hard, I think this is my talent, so many years is not easy; Secondly, I can simplify complex issues, look at the issue to seize the key points in a very short time; Thirdly, I think my strong leadership.

2. A child you think the most problems?

What is the future of my life? !

I remember when the primary 34-year dream to become a tractor driver, I am very happy to open tractor.

3. What type of person do you think the economic will succeed?

There are many successful models, some small, difficult to determine, as President Chen (Chen Tianqiao) such a success. May be a small staff, or a small business person can be successful, but hard work will be successful, this success are of different sizes, and the rest by the opportunity.

The success of my own there are many factors, first through the wisdom, the second by the opportunity, third, by industry and the fourth is by passion. Any one is very important to me.

4. What you most admire in the work environment?

A stressful environment. I like the pressure of competition.

5. What do you admire the staff?

Hardworking employees.

6. What would you fire the staff?

Disloyal employees. Employees can not afford that was my problem, because when I recruit I have a trial process. Quality problems on the staff I will fire, I will not dismiss other.

7. You want your employees to define what kind of person?

They respected most.

8. Management process in your company's biggest problem encountered is what?

Over the past 10 years in the management, I should not encounter too many problems.

9. How do you handle the relationship between themselves and their boss?

Mutual trust and maintain communication.

10. Your average daily hours of work hours?

About 12 hours.

11. You work a year income?

I have to say Microsoft's right, a grand speak out too sensitive, I have Microsoft pay almost 2.5 million yuan plus options, add up to 10 million yuan a year incomes.

12. Someday, are you prepared to create a completely their own brand?

Not considered.

13. You want to leave your next corporate culture?

Corporate values, business and culture.

14. Under what circumstances would you retire?

Before the age of 65 I would not consider retirement.






相关链接:



TOP Backup And Restore



Encourage you Dealers



PMP Exam tips



Real To MP4



Easy To Use Health And Nutrition



Listed company s three Key financial indicators



See our Court! Within the wide Sogou Super Rabbit letter



3GP To FLV



States United States to transfer?



National Domain Name defeat ". COM"



Input Change Patterns! Sogou Cool Character You Become More Popular



runtime Error 324 repair now



Yum 2007 "Ten Key Words"



MKV To VOB



Monday, October 18, 2010

Comments: Baidu more recent non-



Baidu, Baidu, really does make a pool of Oulu

Why is this non-local search engine giant recently more?

Baidu has landed me in one of the show.

First, the antitrust defendant, a claim is 170 million yuan, Tangshan, a company came out and said: PPC, I am out of high prices, the top three, business is booming, who wants to site plan revision, the lowest bid when ranking the first, whether position before and after were included in the content even sharply ... ...

Side outsiders conquering a city, there was underway a home fire wall.

November 8, the one called "Baidu marketing Chexingtianxia" of the PPT began spreading online sensation, which is said to spread out from the inside Baidu, of course not be ruled out to competitors.

67 of the PPT on the "value-added services," a surprised to read, "Crisis Public Relations: the link in the page search screen (live chains)." The Baidu most competitive integrated marketing package, paste it also stated that the marketing part, "PR protection: delete negative information, enhance brand credibility to guide the positive public opinion."

CnBeta have friends anonymous comment: "Baidu, really very powerful, has become a Crime Scene it!"

Since then, November 10, Baidu Public Relations issued a statement on the theme "Our God in heaven: the user experience first," mainly used "is included by search engines, and search engine fairness has nothing to do with search engines The profit model irrelevant. Baidu will reject some of your pages, the only reason: The inclusion of the information can not be good for Baidu's users search experience "to cope with the defendant monopolized the event.

Baidu's PR contact, confirmed that they had been informed before the statement and has studied PPT spill, but did not make this statement in the relevant assessment. However, there Baidu insiders pointed out that it was a fraud of the PPT, but not convenient to Baidu for the time being, "the official response."

The above statement and the "false is said," so that I recall in October of this year, while Baidu has ignited when the Sanlu incident, in a meeting of the brand's meeting, a professor of marketing face of "what values Baidu What is this? Baidu's bid ranking is how is that? "The question, Baidu stakeholders generally the answer is:" Even to us 10 million, 100 million, or more, we do not undermine the Baidu brand dry something! "

Because it can reduce the total cost of ordinary people to find information, called for "information to people-oriented" search engine providers, quickly becoming the information age, a strong IT technology companies. For technology-based companies, has always been, people with the attitude towards children, loved the technology-based companies.

Why is the pride of a technology, but will Bad Baidu recently been?

The most important search engine ranking algorithms is naturally confidential, but we can know is, google's search results page rank (who is linked much more the sort who will be high) and the relevance of a link, while Baidu's results are Auction and related Phase is linked. So, to confirm the search results relevance, importance of technology, and the "key words" about the price of Competition, where to one end of the call whether this scale?

Of course, this is related to how we look at a search engine technology provider. It is able to provide effective service database marketing agency, or an objective, neutral and basic requirements for the new media, and on this basis, an extension of its business intelligence?

In the "Search" author 绾︾堪宸寸壒鍒?view, "Search is the gateway to the world's interest and desire of the window", as "thought control the world with the search giant" has appeared, we understand the world's eyes, has the The search giant for us to bring filtered "colored glasses." We naturally hope that it will be fair and objective, rather than borrowing the name of technology, to money-driven permutations and combinations.

So, Google made a "Don't be Evil (not evil)" slogan. Whether he did or not, at least show that search engines really have the "evil" the ability and potential trend.

As Bopu Man in the "technical monopoly" has said, "technology is an important attribute of modern media, media technology on the one hand shape our thinking and way of life, it also created a modern media empire's hegemony. "

So, it seemed, IT upstart, it is easy to become a hegemonic oligarchy.

Compared with Google, Baidu's success in local, a large part of it had benefited from a better user search experience, while it creates a set of "PPC" charging mode. However, we need to remember an old saying, "Success Xiao He, Xiao He also defeated."

As companies, especially listed companies, Baidu have enough self-control to keep "PPC" and "search just" balance. Once the results of growth by the temptation to balance all the way to the left and connivance of tilt. On the surface, is the damage and search for notarization, and is a business ethics issue, but the search affect the impartiality of the user experience and ultimately influenced "Everlasting," this major project. In other words, this is short-term benefits and long-term interests of the discrimination of relations.

Baidu new baked in the third quarter of 2008 earnings are still beautiful, revenue compared to last year, an increase of 85.1% to about 919.1 million yuan, compared with operating profit growth of 119.1 percent over the same period last year to about 368.3 million yuan . Net profit, compared with growth of 91.4% over the same period last year to reach about 347.9 million yuan.

But, more and more online banter begin the dialogue:

You see Kunitari now? Orangemen you see it too!

You use Baidu, right? You do it with Baidu? - If users have a sense of shame, this could be really easy to get up.







相关链接:



Salary Does Not Mean That Monetary Incentives



Shopping Guide All High-end DVD Recorder Raiders



Launchers And Task Managers REVIEWS



AVI to MOV



Zhou Kaixuan: NO sex woman in Hong Kong



Using VMware, VOWED to computer "cloned a technique"



DivX TO 3GP



Recommend Puzzle And Word Games



quot failed to START because msvcr80.dll was not



WGA newest setting: It may BE pirated



Wave escort firm in Hefei



Using FrontPage in a picture on the PRODUCTION of multiple hyperlinks



MOV To MPEG4



Tuesday, October 5, 2010

SA118 translation (12)


Chapter XIII reading shell scripts
Translation: hfzheng
hfzheng@sohu.com
Please keep this information reproduced
Basic shell script
A shell script is an ASCII file that contains a series of commands and comments.
Note that the text of the document to illustrate the functions of the script and the finished script for each line of the function needs to be done, comments begin with #.
Determine the type of shell script
Script, the top line shows the script shell program type, for example, for the Bourn shell, the first line should be:
#! / Bin / sh
Kernel using #! To identify the procedures used to translate the script.
Note: korn shell the first line should be #! / Bin / ksh, c shell the first line should be #! / Bin / csh.
However, not all of the shell script uses the top line to identify the shell program.
Some scripts can be at the top of a basic text notes. And the same shell the parent shell to execute the script. Some scripts may not comment at the top. In this case, use the default shell program to execute the script.
Create a basic shell script
Create a basic shell script using the following steps:
1, using the vi editor, create a file named my.script, enter the command, followed by the tab key, then the definition of a # at the beginning of the Notes;
2, so that files can be implemented, then the command line, enter the file command.
$ Vi my.script
who # To view who is logged on the system.
date # To view the current date and time
ls-l # To view files in current directory
: Wq
$ Chmod 755 my.script
$. / My.script
Bourne shell programming
Solaris Operating Environment for the management of the standard management bourne shell script is the script.
In order to successfully control the behavior of the operating environment changes, the system administrator must be able to read, modify and customize these different shell script file.
Usually, all the Bourne shell script including a set of UNIX commands, Bourne shell built-in commands, program structure and comments.
Bourne shell script
To be able to read, more important is to understand the content of the basic shell script to be able to:
1, can understand how the parameters passed to the script, by using a special built-in variable called location variable transmission;
2, to identify and analyze the conditions of simple structure and process control;
Special shell built-in variables
Location parameter
Special shell built-in variables called positional parameters for passing parameters to the script from the command line.
In the command line mode, with the script name separated by spaces after each word, as parameters, these parameters in the shell script called positional parameters.
Command format
scriptname argument1 argument2 argument3 ...
When the script execution, shell command line automatically store the first parameter to the positional parameters $ 1, the second parameter to the positional parameters $ 2, the third parameter to the location parameter # 3, and so on.
A location parameter reset
set command is used to reset the positional parameters.
The following example describes how to use the set command to set the location parameter.
First implementation of the option-m with the who command to see the output:
$ Who-m
user1 pts / 5 Mar 13 11:43 (host1)
$
Now create a shell script using the cat command, named my.script3:
$ Vi my.script3
#! / Bin / sh
set 'who-m'
echo Here are the positional variables that have been set:
echo The first is: $ 1
echo The second is: $ 2
echo The third is: $ 3
echo The fourth is: $ 4
echo The fifth is: $ 5
echo The sixth is: $ 6
echo This script is: $ 0
$ ^ D
Using the chmod command so that the script can do:
$ Chmod 755 script3
$
Implementation of the new script:
$ My.script3
Here are the positional variables that have been set:
The first is: user1
The second is: pts / 5
The third is: Mar
The fourth is: 13
The fifth is: 11:43
The sixth is: (host1)
This script is: my.script3
$
Bourne shell allows the use of up to 9 positional parameters, $ 1 to $ 9. Also on the parameters of the script name $ 0 reference.
Positional parameters meaning
$ 1 to $ 9, $ 1 to $ 9 reference position parameters
$ 0 references the current shell script name
Two other useful positional parameters is $ # and $ @.
1, $ #: Returns are stored in the $ 1 to $ 9 positional parameters of the total number of command line arguments;
2, $ @: start position parameters, display parameters for each store;
The following examples illustrate the role of script in the location parameters.
Create a script called my.script4, change the property to the executable.
$ Vi my.script4
#! / Bin / sh
echo The script name is: $ 0
echo
echo The first argument passed is: $ 1
echo The second argument passed is: $ 2
echo
echo The highest numbered parameter is: $ #
echo The parameters passed to the script are: $ @
^ D
$ Chmod 755 script4
$
Implementation of the new script, with stop and start arguments.
$ My.script4 start stop
The script name is: my.script4
The first argument passed is: start
The second argument passed is: stop
The highest numbered parameter is: 2
The parameters passed to the script are: start stop
$
Conditions of structure and process control
Conditions of order
Conditions command allows you to perform true or false based on a condition corresponding task. The simplest condition is if the command command.
If the command can test conditions, test results under the conditions to change the script execution process.
Command format
if command
then
command
command
fi
Exit status
When the program after the completion of the implementation (command line or script), returns an exit status, then back to shell, an exit status is an integer from 0 to 255.
According to the general command format given above, if the structure after the command is executed, and returns exit status. If the exit status to 0 in the then and fi command to be executed between the structure, fi terminated if block.
However, how the first command, the exit status non-zero, that command fails, then Keyword subsequent statements are ignored, processes the back between the jump fi statement.
Invalid parameter detected error conditions can cause the command failed.
Shell variable $? Shell automatically set by the last executed command exit status, echo command can display the parameter value.
The following example describes how to view the command line mode command a successful and unsuccessful implementation of the exit status.
$ Mkdir newdir
$
$ Echo $?
0
$
$ Mkdir
mkdir: Failed to make directory "newdir"; File exists
$ Echo $?
127
$
test command
Built-in test command if command is usually followed.
Test command is used to calculate the value of the expression, if the result is true, return zero exit status, if the result is false, return non-zero exit status.
Command format
if test expression
then
command
fi
The following example is used to test whether the variable $ name has been pre-set to the value of user2?
if test "$ name" = "user2"
then
echo "matches"
fi
Equal sign operator to test two values the same? In other words, test ordered $ name variable used to test whether the string user2, if so, return zero exit status, otherwise it returns non-zero exit status.
Another test format
test command is usually used in shell scripts, shell commands can also identify another test format, brackets [] in fact represents the test command.
The previous command can be rewritten as the following forms:
if ["$ name" = "user2"]
...
shell or the execution of the test command, and only use this format, test like the end of the expression a] bracket. In the first brackets [and after the final brackets] must be preceded by a space.
Command format
if [expression]
then
command
command
fi
The following example is used to test the value of an expression, if the result is true, return zero exit status, the result is false, return non-zero exit status.
Create a script called my.script5 so that it can perform, and execute the script.
$ Vi> my.script5
#! / Bin / sh
if
name = user5
["$ Name" = "user5"]
echo $?
then
name = user7
["$ Name" = "user5"]
echo $?
$
$ Chmod 755 my.script5
$ My.script5
0
1
$
test command operators
Almost every shell script should deal with one or more of the script, so there is a test command files for the classification operators, these operators make the file in the build script you can provide the tools for asking questions related documents.
The following are the most commonly used file operators:
Operator returns true (zero exit status) if
-D file file for the directory
-F file file is a regular file
-R file file can be read by the process
-S file file length of the non-zero
-W file file can be written process
-X file file executable
The following example describes how to use the file operator to test whether a file exists.
Create a script, named my.script6, make it executable, and run the script, the final step, check the exit status of the results.
$ Vi my.script6
#! / Bin / sh
if [-f $ HOME]
then
echo "found it!"
fi
$ Chmod 755 my.script6
$ My.script6
found it!
$ Echo $?
0
$
case command
case command is used to test the situation with multiple conditions.
Command format
case value in
value1) command
command;;
value2) command
command;;
value3) command
command;;
backup bin bin_old conf config crawler.tar.gz crawler_bin.tar.gz data eshow eshow_sitemap.html generate.sh google.html google.html.md5 log maint news: 10 news: 11 news: 12 news: 13 news: 14 news: 15 news: 16 news: 17 news: 18 news: 2 news: 3 news: 4 news: 5 news: 6 news: 7 news: 8 news: 9 outboundLinksMgr.sql seeds sitemap.html svn tasks tmp xml2dict-2008.6-tar. gz xml2dict-read-only) command;;
esac
case the value of the
case variable values match value1, value2, and so on, until a match is found.
If the case does not match the value of the variable, program execution value *) after the command, until the pair of brackets or esac.
The following example shows how to use the case command:
$ Vi my.script7
#! / Bin / sh
hour = 'date | cut-c12-13'
echo $ hour
case "$ hour" in
0? | 1 [01])
echo "Good Morning.";;
1 [2-7])
echo "Good Afternoon.";;
*)
echo "Good Evening.";;
esac
$ Chmod 755 my.script7
$ My.script7
16
Good Afternoon.
$
case command value calculation $ hour, stored in case the value of the variable in the current time, date command to its output through the pipelines to cut command, cut command cut hours and choose characters from the output by 12 and 13.
Case value of the variable $ hour match each value, until a match is found, then the results echo to the screen.
1, the first test value used to determine whether the matching case value of the variable hours of the morning? (Eg, 1:00 am to
11:00 am): 0? | 1 [01]), 0? To 0 and used to match a single character wildcard characters? . Therefore, the test values may be 01, 02, 03, 04, 05, 06, 07, 08, 09. | Is the or statement. 1 [01] is number 1 and for a single character wildcard [], where possible test value of 10 and 11.
2, the second test value used to determine whether the case matches the value of a variable number of hours this afternoon? (Eg, 12:00 pm to
5:00 pm): 1 [2-7]), may be the test value of 12, 13, 14, 15, 16, 17.
3, the third test value used to determine whether the matching case value of a variable number of hours at night? (Eg, 6:00 pm to
12:00 am): *), may test the value of 18, 19, 20, 21, 22, 23,24.
exit command
Built-in command called exit the shell allows the user to immediately terminate the shell script's execution. Exit frequently as the end, jump or return to the command line command.
Command format
exit n
exit command in the parameter range from 0-255 integer.
Can be placed in one or more of the script exit command, used to tell the shell to meet certain conditions when the exit script, which takes precedence over the normal end of the script.
In large script file, use different integer as the exit command of different parameters, when the need to determine when a specific condition is met is very useful.
If the script exit with 0 as the parameter, indicating the successful implementation of procedures, the normal end. Non-zero parameters (1-255) s description of certain types of errors occurred.
Users can use the echo command to quickly identify exit results:
$ Echo $?
Read a script sample Solaris Management
The following example is given of the Solaris Management is a script in the directory / etc / init.d in the maintenance.
These scripts can be used at boot time, you can also use the system to use closed.
System administrators can manually start or stop system daemons and services, through the implementation of stop and start with a parameter management script.
For example, to manually stop or start the audit process, root user can invoke the following command:
# / Etc / init.d / audit stop
# / Etc / init.d / audit start
Shell script using the previous learned knowledge, the following script line by line analysis to determine the procedures for the implementation of what will happen when:
/ Etc / init.d / audit script
1 #! / Sbin / sh
2 #
3 # Copyright (c) 1997 by Sun Microsystems, Inc.
4 # All rights reserved.
5 #
6 # ident "@(#) audit 1.5 97/12/08 SMI "
7
8 case "$ 1" in
9 'start')
10 if [-f / etc / security / audit_startup]; then
11 echo 'starting audit daemon'
12 / etc / security / audit_startup
13 / usr / sbin / auditd &
14 fi
15;;
16
17'stop ')
18 if [-f / etc / security / audit_startup]; then
19 / usr / sbin / audit-T
20 fi
21;;
22
23 *)
24 echo "Usage: $ 0 (start | stop)"
25 exit 1
26;;
27esac
28exit 0
interpretation of audit management script
Following the implementation of audit script line by line to explain what happened:
Line 1: #! / Sbin / sh, explain procedures for the implementation of the shell, here for the Bourne shell;
Line 2-6: comment lines, beginning with #;
Line 7: blank line
Line 8: case expression, given the location parameter case the variable $ 1, the variable pass the first command line argument to the script.
Line 9: Description of the variables given case the first one matched value, in this case start; If the two values match, the result is true, return a zero exit status (0), the script jump to the next line, line 10 . If the two values do not match, the result is false, returns a non-zero exit status, the script jumps directly;; after the statement, here for the first 16 rows;
Line 10: if conditional statement to test the value of an expression; If the file / etc / security / audit_startup exist, the result is true, jump to the next line, 11 rows. If the file / etc / security / audit_startup does not exist, the script jumps directly to the implementation of the fi statement, here for the first 15 rows;
Line 11: implementation of the echo command to display the starting audit daemon to the screen;
Line 12: implementation of the audit subsystem initialization script audit_startup safe in the actual start of the audit daemon's security;
Line 13: Start audit daemon, the audit trace file generation process control, and audit trace file location;
Line 14: if block statement marks the end;
Line 15: Send flow control instructions, make the script skip esac statement after the implementation of 16 to 27 rows to skip and not be executed;
Line 16: blank line;
Line 17: Description of the second case the variable value, here for the stop; If the two values match, the result is true, return a zero exit status (0), skip to the next line of the script execution, which is 18 lines, if two values do not match, the result is false, returns a non-zero exit status, the script jumps directly;; after the statement, here for the first 22 rows;
Line 18: if conditional statement to test the value of an expression; If the file / etc / security / audit_startup exist, the result is true, the script the next line, that is, line 19, if the file / etc / security / audit_startup does not exist keyword after the statement is ignored, the script jumps to the Executive;; after the statement, here is the line 21;
Line 19: implementation of the / usr / sbin / audit-T function, to send signals to the audit daemon, telling audit daemon to close the current audit trace file, so that monitoring failure, death;
Line 20: end if block statements;
Line 21: send flow control instructions, make the script skip esac statement after the execution, the first 22-27 rows to skip and not be executed;
Line 22: blank line;
Line 23: If the case can not match the variable 9 rows and 17 rows of values, shell command line implementation of Article 24-25;
24 line: the implementation of echo command displays the following text string to the screen:
string to the screen:
Usage: / etc / init.d / audit (start | stop)
Line 25: implementation of the exit command to terminate the script immediately, and return to the command line mode; instruction program appears certain types of errors;
26 line: send flow control instructions, scripts, skip to the last line after the esac statement;
Line 27: end case statement block;
Line 28: implementation of the exit command to terminate the script, return to the command line mode, just exit the program successfully.









Recommended links:



AVI to 3GP



5 things to keep in mind while purchasing green



WMV to MPEG



ASF to MPG