Common securecrt commands

Source: Internet
Author: User
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.
Tail-F log name: View logs

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. Rm-RF force Delete non-empty directory

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

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, securecrt garbled solution: Options-> sessionoptions-> appearance-> font to default to change 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.
[[Email protected] 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.
[[Email protected] bin] $./pg_dump-u Postgres-T testtable-D testdb> testtable. Dump
Or [[email protected] bin] $./pg_dump-u Postgres-D testdb-T testtable-f c-V> testtable. Dump

4. S data import.
[[Email protected] bin] $./Psql-u Postgres-D testdb <testtable. Dump
Or [[email protected] 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.
[[Email protected] bin] $/usr/bin/PHP-Q./batchstart. php

Common securecrt commands

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.