Common SecureCRT file Operation Commands

Source: Internet
Author: User
Tags psql
Common commands for operations on common SecureCRT files: 1. ls only lists file names (which is equivalent to dir. dir can also be used)-A: lists all files, including hidden files. -L: a list that contains most attributes of a file. -R: recursive display. -- Help: the help of this command. II. common commands for operating common files in cd... SecureCRT: 1. ls only lists file names (equivalent to dir, which can also be used)-A: lists all files, including hidden files. -L: a list that contains most attributes of a file. -R: recursive display. -- Help: the help of this command. II. cd Change Directory cd/: Enter the root directory cd: Return to your Directory (different directories vary by user, root is/root, xxt is/home/xxt cd ..: return to the upper-level directory pwd: displays the current directory 3. less File name: view the file content. Tail-f log name: View Log 4. q. exit the open 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 forcibly delete non-empty directory 8. display the 20 most 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. cd command to enter a folder: mkdir + folder name command for creating a folder sz + file name command for sending files from the server side to the local machine rz command for transferring files from the local machine to the server side ll command for listing all files in the current directory, including the detailed information of each file dir to open the current file for the current folder vi 11. when editing a File: a switches to edit mode ctrl + c exit Edit mode dd deletes the entire line: q exits the current file: w: write and save the parameter-f forcibly xx of the current file... Other commands: 1.ps-ef // view the server processes, which are displayed in the list. Ps display the processes currently running in the system/usr/bin/ps [option]-e display each currently running process-f generate a complete list 2.ant-buildfile CMS_MainTrunk.xml // build package 3.vi test.txt // Browse file content I {insert write input} esc exit insert: wq! Write: Save and exit vi mode: q! Do not save exit vi Mode 4, secureCRT garbled solution: Options-> SessionOptions-> Appearance-> font to default to the UTF-8, you can display the Chinese font. 6. hostname: check hostname 7. ifconfig query host IP address 8. in the S-CRT, press ctrl + c and ctrl + v: Options --- Global Options --- Edit default Settings, click Terminal --- Emulation, and then click Mapped Keys, use windows copy and paste key. click OK. 9. run vi filename: open or create a file, and place the cursor in the first line vi + n filename: open the file, place the cursor at the beginning of line n vi + filename: open the file, and place the cursor at the beginning of line n vi +/pattern filename: open the file, 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 first n rows n +: Move the cursor down n rows n -: move n rows up n $: Move the cursor to the end of n rows 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: number 0) move the cursor to the beginning of the current line $: Move the cursor to the end of the current line 11. screen tumble command: Ctrl + u: Ctrl + d: Ctrl + f: flip a screen at the end of the file // It seems to be rCtrl + B; flip a screen at the beginning of the file 12. search command:/pattern: from Search for pattern at the beginning of the cursor at the end of the file? Pattern: Search for pattern n from the beginning of the cursor to the file. pattern N: Repeat the previous search command in the same direction. n: Repeat the previous search command in the opposite direction. s: 1. enter the SQL running environment. [Test @ test bin] $. /psql-n dbname-U usrnamestay81 = # select count (*) from table1; count ------- 5986 (1 row) 2. exit. exit after use. Otherwise, the connection is suspended. Stay81 = # \ q 3. s 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. postgres 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 database name,-t is the table name, if the entire database export, do not need this item.
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.