Common commands:
1. ls only lists file names (equivalent to Dir, Dir can also be used)
-A: lists all objects, including hidden objects.
-L: a list that contains most attributes of a file.
-R: recursive display.
-- Help: the help of this command.
Ii. Change directory with CD
CD/: Enter the root directory
CD: Return to your own directory (different directories vary by user, root is/root, xxt is/home/xxt
CD...: return to the parent directory
PWD: displays the current directory
Iii. Less File Name:View the file content.
Iv. Q: exit the opened file.
5. upload files:Rz select the file to be transferred and OK.
6. download the file:SZ specifies the file name. Press enter to download the file to the securecrt/download directory.
7. delete an object:Rm deletes the file and rmdir deletes the empty directory.
8. Display 20 recently entered commands: History 20
9. Get the Help Command -- help to view the detailed parameters of the command:For example, Rz -- Help, SZ -- help.
10. Run the CD command to enter a folder:
Command for creating a folder by mkdir + folder name
SZ + command for sending file names from the server to the Local Machine
Rz command for transferring files from the local machine to the server
Ll list all files in the current directory, including detailed information about each file
Dir to the current folder
VI open the current file
11. When editing a file:
A switch to edit mode
CTRL + C Exit edit mode
Dd deletes the entire row
: Q: exit the current file.
: W write and save the current file
-F forcibly XX parameters...
Other commands:
1. PS-Ef // view the server processes, which are displayed in the list.
PS: displays the processes currently running in the system/usr/bin/PS [Option]-E: displays a complete list of each currently running process-F
Actual Operation:
--------------------------------------
1 SSHClient Connection10.5.1.55System (see remote client startup instructionsSecurecrt.doc)
$ CD/home/bea2/user_projects/csdomain/bin
2ViewWeblogic92Service Process
$ PS-EAF | grep WebLogic
Bea2 327926 331940 0 13:08:45 pts/4 grep WebLogic
WebAdmin 421908 368956 0 Sep 24-/usr/java5_64/bin/Java-xms256m-xmx512m-da-dplatform. home =/home/WebLogic/BEA/weblogic92-dwls. home =/home/WebLogic/BEA/weblogic92/Server-dwli. home =/home/WebLogic/BEA/weblogic92/integration-dweblogic. management. discover = true-dwlw. iterativedev = false-dwlw. testconsole = false-dwlw. logerrorstoconsole =-dweblogic. ext. dirs =/home/WebLogic/BEA/patch_weblogic923/profiles/default/sysext_manifest_classpath-dweblogic. name = adminserver-djava. security. policy =/home/WebLogic/BEA/weblogic92/Server/lib/weblogic. policy weblogic. server
bea2 491796 385044 17 00:12:50 pts/6 182: 55/usr/java5_64/bin/Java-xms6g-xmx8g-javaagent:/home/bea2/user_projects/csdomain/introscope/wily/agent. jar-DCOM. wily. introscope. agentprofile =/home/bea2/user_projects/csdomain/introscope/wily/introscopeagent. profile-DCOM. wily. introscope. agent. agentname = adminserver-da-dplatform. home =/home/WebLogic/BEA/weblogic92-dwls. home =/home/WebLogic/BEA/weblogic92/Server-dwli. home =/home/WebLogic/BEA/weblogic92/integration-dweblogic. management. discover = true-dwlw. iterativedev =-dwlw. testconsole =-dwlw. logerrorstoconsole =-dfile. encoding = GBK-dibm. stream. NIO = true-dweblogic. ext. dirs =/home/WebLogic/BEA/patch_weblogic923/profiles/default/sysext_manifest_classpath-dweblogic. name = adminserver-djava. security. policy =/home/WebLogic/BEA/weblogic92/Server/lib/weblogic. policy weblogic. server
Description: view the logon user as prompted.Bea2Start the process, pay attention to the redBea2For processes,491796Process ID
3Run the following command to kill the process:
$ Kill-9 491796(According2Find the system process number)
Note: Execute after execution$ PS-EAF | grep WebLogicCommand will not see the process numberWebLogicProcess
4Start the service
$./Quickrun. Sh
-------------------------------------------------------------------
2. Ant-buildfile cms_maintrunk.xml // build package
3. VI test.txt // browse the File Content
I {insert write input}
ESC exit insert
: WQ! Write: Save and exit VI Mode
: Q! Exit VI mode without saving
4. I usually use the PS-Ef command to view the server processes displayed in the form of a list; Use the command pstree to view the server processes, so that the server processes displayed in the form of a tree are displayed.
The advantage of the pstree command is that you can immediately find the parent process of a process. You may need to use the-P option to display the PID of each process, and the-u option to display the user name that starts the process.
In general, this tree structure is relatively long, so you need to execute pstree-up | less, which will allow you to view the entire process tree structure.
5. securecrt garbled solution: Options-> sessionoptions-> appearance-> font to default into the UTF-8, you can display the Chinese font.
6. hostname: Check hostname
7. ifconfig query Host IP Address
8. use Ctrl + C and CTRL + V in the S-CRT:
Options --- Global Options --- edit default settings, click Terminal --- emulation, click mapped keys, click "use Windows copy and paste key", and click "OK.
9. Run the following command to access VI:
VI filename: open or create a file and place the cursor at the beginning of the first line
Vi + N filename: open the file and place the cursor at the beginning of line N
Vi + filename: open the file and place the cursor at the beginning of the last line
Vi +/pattern filename: open the file and place the cursor at the first string matching pattern
10. command for moving the cursor:
}: move the cursor to the beginning of the paragraph
{: move the cursor to the end of the paragraph
NG: move the cursor to the beginning of line n
N +: move the cursor down n rows
N -: move n rows up with the cursor
N $: move the cursor to the end of line n
H: move the cursor to the top line of the screen
M: move the cursor to the middle line of the screen
L: move the cursor to the last line of the screen
0 :( Note that the number is zero) move the cursor to the beginning of the current row
$: move the cursor to the end of the current row
11. Screen tumble commands:
CTRL + u: half screen at the beginning of the file
CTRL + D: Flip the half screen to the end of the file
CTRL + F: Flip the screen to the end of the file // It seems to be r
CTRL + B; open a screen at the beginning of the file
12. SEARCH command:
/Pattern: Search for pattern from the beginning of the cursor to the end of the file
? Pattern: Search for pattern from the beginning of the cursor
N: Repeat the previous search command in the same direction.
N: Repeat the previous search command in the reverse direction.
Postgres usage:
1. Enter the SQL running environment.
[Test @ test bin] $./Psql-N dbname-u usrname
Stay81 = # select count (*) from Table1;
Count
-------
5986
(1 row)
2. Exit. Exit after use. Otherwise, the connection will be suspended.
Stay81 = # \ q
3. Postgres data export.
[S @ test bin] $./pg_dump-u Postgres-T testtable-D testdb> testtable. Dump
Or [S @ test bin] $./pg_dump-u Postgres-D testdb-T testtable-f c-V> testtable. Dump
4. S data import.
[S @ test bin] $./Psql-u Postgres-D testdb <testtable. Dump
Or [S @ test bin] $./pg_restore-u Postgres-D testdb <testtable. Dump
5. One host dumps the database directory to another.
Pg_dump-H host1-P 5432 dbname | Psql-H host2-P post1 dbname
Or./pg_dump-u Postgres-D testdb1-T testtable |./Psql-u Postgres-D testdb2
-U is the user name,-D is the DB name, and-T is the table name. This option is not required if the entire database is exported.
6. PHP Execution.
[Test @ test bin] $/usr/bin/PHP-Q./batchstart. php
Practice:
/Home/absys6 $ ls
Dvlp dvlp_bak20090413 personal TMP
/Home/absys6 $ CD dvlp
/Home/absys6/dvlp $ ls
/Home/absys6/dvlp $ CD sv_policy
/Home/absys6/dvlp/sv_policy $ ls
Include SRC
/Home/absys6/dvlp/sv_policy $ CD SRC
/Home/absys6/dvlp/sv_policy/src $ ls
/Home/absys6/dvlp/sv_policy/src $ ls * PC // filter files
/Home/absys6/dvlp/sv_policy/src $ grep VIP * PC // list all. PC files containing VIPCode.
/Home/absys6/dvlp/sv_policy/src $ VI plyprmcnt. PC // view the entire file.
Other commands: http://www.zjgzx.com/blog/user1/1/archives/2008/4607.html