SecureCRT upload, download and common commands

Source: Internet
Author: User
Tags first string psql file transfer protocol

the file transfer protocols under SECURECR are ASCII, Xmodem, Ymodem, Zmodem
 
 
 
ASCII: This is the fastest transport protocol, but only text files can be transferred.
 
 
 
Xmodem: This ancient transmission protocol is slow, but due to the use of CRC error detection method, the transmission accuracy rate can be as high as 99.6%.
 
 
 
Ymodem: This is an improved version of Xmodem, which uses 1024-bit segments to deliver faster than Xmodem.
 
 
 
Zmodem:zmodem adopts the stream-flow (streaming) transmission mode, the transmission speed is fast, but also has the function of automatically changing the section size and the breakpoint continuation transmission, the fast error detection and so on. This is currently the most popular file Transfer Protocol
 
 
 
set default upload download directory
 
options->session Options->terminal->xmodem/zmodem
 
set upload and download directories on the right
 
 
 
using Zmodem to upload files from a client to a Linux server
 
1. Log in to the Linux terminal with SECURECRT.
 
2. Select the path where you want to place the uploaded file, in the directory and then enter the RZ command, SECURECRT will pop up the file selection dialog box, find the file you want to upload in the search scope, press the Add button. Then OK can upload the file to Linux.
 
or, in the Transfer->zmodem upoad list pop-up File selection dialog box, select the file and press the Add button. Then the OK window closes automatically. Then under Linux, select the directory where the files are stored and enter the RZ command. Liunx the file to the directory.
 
to download files to the client using Zmodem:
 
sz filename
 
Zmodem receive can start on its own. The downloaded file is stored in the default download directory you set.
 
 
 
if the RZ, sz command is not valid, please install rzsz-0.12.20-853.2.i586.rpm first
 
the specific installation method is:
 

RPM-IVH rzsz-0.12.20-853.2.i586.rpm


Common commands:
First, LS only lists the file name (equivalent to Dir,dir can also be used)
-A: Lists all files, including hidden files.
-L: List form, which contains most of the properties of the file.
-R: Recursive display.
--help: Help for this command.
Second, CD change directory
CD/: Go to the root directory
CD: Go back to your directory (different directories are different, root is/root,xxt for/home/xxt
Cd.. : Back to Parent directory
PWD: Displays the directory where you are currently
Three. Less file name: View the contents of the file.
Four. Q exit the Open file.
Five. Upload file: RZ Select the file to be transferred, OK.
Six. download file: Sz Specify the file name, enter to hit, that is downloaded to the Securecrt/download directory.
Seven: Delete file: RM Delete file, rmdir delete empty directory.

Eight. Show the last 20 commands entered: History 20

Nine. Get help command--help View command under detailed parameters: such as: RZ--help, Sz--help.


10. The CD Entry command to a folder:
mkdir+ folder name command to create a folder
sz+ file name from server-side send files to native command
RZ commands to transfer files from the local to the server side
ll lists all files in the current directory, including details for 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 Delete entire row
: Q Exits the current file
: W writes and saves the current file
-F Force XX parameters ...

Other commands:
1.PS-EF//View the server process as a list of the server processes that are displayed.
PS shows the process currently running on the system/usr/bin/ps [options]-e display each now running process-F to generate a full list

Actual operation:
--------------------------------------
1 SSH client connects to 10.5.1.55 system (see Starting remote client Instructions Securecrt.doc)
$ cd/home/bea2/user_projects/csdomain/bin
2 Viewing the WEBLOGIC92 service process
$ ps-eaf | grep WebLogic
BEA2 327926 331940 0 13:08:45 pts/4 0:00 grep weblogic
WebAdmin 421908 368956 0 Sep 24-4:13/usr/java5_64/bin/java-xms256m-xmx512m-da-dplatform.home=/home/weblogi c/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 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
Note: According to the above prompts to see the login user bea2 Start process, note the Red BEA2 for the process has, 491796 for the process number
3 Execute the following command to kill the process
$ kill-9 491796 (based on 2 operation to find the system process number)
Description: Execute $ ps-eaf after execution | The grep weblogic command will not see the process number of the WebLogic process
4 Starting the Service
$./quickrun.sh

-------------------------------------------------------------------
2.ant-buildfile cms_maintrunk.xml//build Bag
3.VI test.txt//Browse file contents
I {insert write input}
ESC exits Insert
: wq! Write save and Exit VI mode
: q! Do not save Exit VI mode
4. I am generally accustomed to using the PS–EF command to see the server process as a list, and to see the process of the server with the command Pstree so that the server process is displayed as a tree.
The advantage of the Pstree command is that the parent process of a process can be identified immediately. You may need to use the-P option to display the PID for each process, and the-u option to display the user name that started the process.
In general, this tree structure is longer, and you need to do so Pstree–up | Less this will give you an overview of the entire process tree structure.
5.secureCRT garbled Solution: Options->sessionoptions->appearance->font to change the default to UTF-8, you can display the Chinese font.

6.hostname: Check hostname
7.ifconfig Query Host IP
8. Use CTRL + C and CTRL + V under S-CRT:
Options---Global options---Edit default settings go inside and point terminal---emulation then point mapped Keys, point lower part, use Windows copy and Paste key, click Confirm.



1. Enter the SQL runtime environment.
[Email protected] bin]$/psql-n dbname-u usrname
stay81=# Select COUNT (*) from table1;
Count
-------
5986
(1 row)
9. Command to enter VI:
VI FileName: Opens or creates a new file and places the cursor at the beginning of the first
VI +n FileName: Opens the file and places the cursor at the beginning of nth
VI + FileName: Opens the file and places the cursor at the beginning of the last line
VI +/pattern FileName: Opens the file and places the cursor at the first string that matches the pattern
10. Move the Cursor Class command:
}: Move the cursor to the beginning of the paragraph
{: Cursor moves to end of paragraph
NG: Cursor moves to the beginning of nth
n+: The cursor moves down n rows
N: Move the cursor up n rows
n$: Cursor moves to end of Nth line
H: Move the cursor to the top row of the screen
M: Move the cursor to the middle line of the screen
L: The cursor moves to the last line of the screen
0: (note is the number 0) cursor moves to the beginning of the current line
$: Cursor moves to the end of the current line
11. Screen Tumbling Class command:
Ctrl+u: First half screen to file
Ctrl+d: Half-screen to the end of the file
Ctrl+f: Turn a screen at the end of the file//as if R
ctrl+b; Turn one screen to the top of the file

12. Search command:
/pattern: Searches for pattern at the end of the file from the beginning of the cursor
? pattern: Searches for pattern from the beginning of the cursor to the top of the file
N: Repeat the last search command in the same direction
N: Repeats the last search command in the opposite direction

Postgres using:
2. Exit, exit after use, or the connection has been 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. Postgres 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. On one host, dump the database directory on another host.
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, which is not required if the entire database is exported.
6.php execution.
[Email protected] bin]$/usr/bin/php-q./batchstart.php


Actual operation:
/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//filtering the file
/home/absys6/dvlp/sv_policy/src$ grep VIP *PC//Lists part of the code that contains all the. pc files for the VIP.
/home/absys6/dvlp/sv_policy/src$ VI plyprmcnt.pc//view the entire file.

SecureCRT upload, download and common 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.