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. 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.

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.