Common SecureCRT commands and common securecrt commands

Source: Internet
Author: User
Tags psql

Common SecureCRT commands and common securecrt commands
 

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 a file: select the file to be transferred and click OK.

6. download file: sz specifies the file name. Press enter to download the file to the secureCRT/download directory.

7. Delete Files: rm delete files, and rmdir Delete empty directories.
 
8. display the 20 recently entered commands: history 20
 
9. Obtain the help Command -- help to view the detailed parameters of the command, such as rz -- help and 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. The sshclient connects to the 10.5.1.55system (see the remote client startup instructions for securecrt.doc).

$ Cd/home/bea2/user_projects/csdomain/bin

2. view the weblogic92 service 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 491796385044 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

3. Run the following command to kill the process:

$ Kill-9 491796 (find the system process number based on 2 Operations)

Note: After you execute the $ ps-eaf | grep weblogic command, the weblogic process with this process number is not displayed.

4. Start 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. move the cursor command:
}: 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 above 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 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 // code that lists all. pc files containing VIP.
/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

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.