Huawei's sco unix training materials 2.3 UNIX Command One, UNIX Command Format 1.50mm Wire To Board Connectors
1.50mm Wire To Board Connectors:Line to board has rubber shell, terminal and needle holder.
The wire to board connector connects the wires to the printed circuit board (PCB) to realize the connection between circuits. Our line to board connectors focus on flexibility and reliability, suitable for small size plug-in and safe termination, and are equipped with friction locking mechanism or full locking mechanism. Our lcedi connectors provide excellent performance in both low voltage differential signaling (LVDS) and embedded DisplayPort (EDP) applications. Our economical power supply (EP) connectors have up to 12 locations, so your product can reliably deliver power to circuit boards when space is limited. We offer PCB male terminals with multiple or single connection types, including bolt mounting, printed circuit mounting, wire crimping, testing, soldering, and mounting frames for quick disconnect applications. 1.50mm Wire To Board Connectors ShenZhen Antenk Electronics Co,Ltd , https://www.antenkwire.com
1. Under the command line of UNIX command prompt, the operating system will display a prompt, prompting the user to enter a line of commands after this prompt. Different shells have different default prompts:
The default prompt of B Shell and K Shell is "$";
The default prompt of C Shell is "%";
However, when logging in as the root user, the system prompt defaults to "#".
Users can change their default shell and prompt.
2. The basic command format can input UNIX commands at the Shell prompt. The basic format of the UNIX command is as follows:
command parameter 1 parameter 2 ... parameter n
UNIX commands consist of a command and zero or more parameters, separated by spaces between commands and parameters, and between parameters. The command format of UNIX is similar to the command format of DOS, but the commands of UNIX are case sensitive, and the commands and parameters must be separated. For example, the following four commands are the same for DOS:
cdmp
cd mp
CD mp
cd \ Tmp
For the UNIX operating system, the command to change the directory is also the cd command. The following is the correct UNIX cd command:
cd / tmp
cd / Tmp
But tmp and Tmp are two different directories. The following two commands:
cd / tmp
CD / tmp
It is not a cd command anymore.
3. Run multiple commands in one line. You can enter multiple commands in one line, separated by ";", such as:
mkdir tmp; cp file1 tmp / file2; ls -l tmp
UNIX will execute the above three commands in sequence.
4. Running the program in the background To make the program execute in the background, simply add the "&" symbol at the end of the command line.
[Example 1] Run the find command in the background to find a file named abc in the current directory and its sub-directories.
The contents of the execution command and immediate display are as follows:
$ find. -name abc -print &
10722
$
...
10722 indicates the process number (PID). When the find command is executed in the background, the results will be displayed.
When running a command in the background, it is best to redirect its output to a file for later inspection.
[Example 2] Run the find command in the background, find the file named abc in the current directory and its sub-directories and save the result in the myfind file.
The execution command is as follows:
$ find. -name abc -print> myfind &
You can continue to enter commands while running the background program.
5. Nohup command When the terminal exits, the background program started by the terminal automatically exits. If the program does not stop running after the terminal exits, use the nohup command to start the background program. For example, the command of Example 2 becomes:
$ nohup find. -name abc -print> myfind &
2. Special keys There are some special keys in UNIX command operation, the list is as follows:
Ctrl + d End keyboard input or exit the current shell
Del interrupt key, stop the current action and return to the shell
Ctrl + s pause screen output
Ctrl + q Continue screen output
Ctrl + u kill key to delete all characters in the line where the cursor is
Esc End the current operation state (such as vi)
Three, UNIX commonly used simple commands The following table lists a few simple UNIX commands:
Explain UNIX command commands and examples for viewing help information man man date
View date date date
Show calendar cal cal 1998
Show banner banner “ABCDâ€
Calculator bc bc
Change password passwd passwd
See who is using the system who who
See who I am who am i
Display user information finger finger username clear screen clear clear
1. The man command-Examples of viewing help information:
View how to use man: man
View the help information for the finger command: man finger
2. The date command-the commands for displaying and modifying the date and time and displaying time are as follows:
date
The display is as follows:
Mon Aug 17 13:43:14 NST 1998
Represents NST standard time, 13:43:14, August 17, 1998, Monday.
3. cal command-display calendar example:
Show calendar for year 1998: cal 1998
Showing the August 1998 calendar: cal 8 1998
4. Banner command-Example of displaying uppercase and uppercase characters: display "HUAWEI" in large characters on the screen, the command is as follows
banner "HUAWEI"
5. bc command-simple calculator
The bc command can perform addition, subtraction, multiplication, division, modulo, and power operations. The operators are "+" "-" "*" "/" "%" "^". bc use examples are as follows
bc
Just enter the formula in the future, such as:
1234 * 3 + 2 ^ 4
Press Enter to display the result, and then wait to enter other formulas. press
6. The passwd command-change password To change your own password, just run:
passwd
In the future, the system will prompt for the original password and enter the new password.
7. Who command-View the usage of UNIX users:
who
The system will display the user name, terminal number and login time of the UNIX being used. To view the user's own information, run:
who am i
8. Finger command-display user information
The finger command displays a larger amount of information than the who command, and its functions are strong. The basic method of use is as follows:
Display login information: finger
Display smith user details: finger smith
9, clear command-clear the screen
clear
4. Simple communication commands among UNIX users
UNIX provides many ways for users to communicate with each other, it allows you to send and receive information in the form of text. You can pass information to other users, all users, or yourself. The source of information can be a text file or content directly input from the keyboard.
(1) The write command can use the write utility to send a message to another logged-in user. When the other party also uses the write command, communication between the two parties is established.
When the user uses the write command, a prompt message is displayed on the other party's user terminal. The format of the write command is as follows:
write desTInaTIon-user [terminal]
Among them, desTInaTIon-user is the registered name of the user you want to communicate with, usually use who command to check its registered name. If the other party logs in on multiple terminals, the terminal can be used to control the write message to the specified terminal. In order to establish a two-way conversation with other users, the user and the other party must execute the write command each time, and must specify a registered name. Generally speaking, when using UNIX to make a call, the two parties of the communication have some agreements: use "o" to end a message, "oo" to end the communication, and use ctrl-d to exit the write command.
[Example 1] Two users alex and jenny on UNIX communicate through the write command.
On the terminal where alex is located (
$ write alex
Hi Alex, are you there? O
Message from Alex (tty11) [Sat Jan 5 15:08]….
Yes Jenny, I'm here. O
...
Thank you, Alex, bye! Oo
Ctrl-d
$
This example illustrates the use of the write command to achieve the communication process of Alex and Jenny. First, Jenny used the first two lines to send a message to Alex. The next two lines are the messages sent by Alex. Jenny received it. The ellipsis indicates that their communication continues. Finally, Jenny uses thank you, Alex, bye! oo tells Alex that he has nothing to say, and type ctrl-d on the next line to exit write and return to the shell.
(2) Use talk to talk to both parties
The talk command is a virtual communication command that allows real-time conversation between the two logged-in parties via the keyboard. The format is as follows:
talk user-name [terminal] <CR>
Note that when using talk to talk to both parties, the machine architecture used by both parties must be the same. When the other party gives a talk command in response, both terminals display
[connect established]
At this time, the two parties can duplex communication. Both sides can input from the keyboard at any speed, and talk displays your input line by line on the screen of you and the other party. use
(3) Use mesg to refuse and allow receiving messages
The mesg command allows or refuses to receive write and talk communication messages sent from other terminals. The mesg command runs on the local terminal, and its usage format is as follows:
mesg [y] [n] 〈CR〉
Among them, y means allow to receive, n means refuse to receive. If neither y nor n is given, the current permission status is reported. example:
[Example 1] Display status:
$ mesg
Then the execution result of the command is:
is y
Or is n
[Example 2] Refuse to receive write and talk communication messages from other terminals:
$ mesg n
$ mesg
is n
(4) Wall broadcast messaging All logged-in users can receive the message. Only super users use this command. The wall command has the following formats:
# wall
# wall filename
# wall "send a message to all the people."
2.4 Logout (exit UNIX system)
After each use, be sure to log out to prevent others from accessing the system through your account and to ensure the integrity of the system. The logout process is as follows: At the UNIX prompt, run:
$ exit
or
$ logout
Or directly press:
Ctrl + d.
Due to different UNIX operating systems, the logout command may also be different.