Linux command to view the log

During operation visited website hit if the server log, we can view the server's log and then view the operation by securecrt abnormal
SecureCRT: is a support for SSH (SSH1 and SSH2) terminal emulation program, simply say that UNIX login under Windows software or Linux server host.
SecureCRT is a remote connection software.
View log under Linux with SecureCRT


Command can be found : https: //www.cnblogs.com/babybottle/p/7656726.html
Log Viewer secure shell client / SecureCRT:
Log host name through a host name / user name / password: ip10.100.40.30 user name: tpdevelop port: 22 password: develop @ log name for themselves,

 Commonly used commands:

pwd: View the current directory
cd ..: to have a return on [cd] a space after
ls: displays the name of the directory project

After the manual feeding into the root directory: cd / opt

Into a particular folder aaa: cd aaa [not preceded by a slash]
By way into the path of the folder: cd / opt / tpapp / Auto / logs
LL: View detailed information directory items
tail: used to display text files at the end of a few line
tail -200f server.log: View the latest under the log directory of 200 log
tail example.txt: example.txt display file contents after ten lines
tail -n 20 example.txt: twenty lines displayed after the file example.txt content
tail -f example.txt display file contents after ten lines example.txt and after adding file content, automatically displays the new contents of the file
tail -n 50 -f example.txt display 50 lines of the contents of the file example.txt and after adding file content, automatically displays the new contents of the file.
tail exit to the command line: ctr + c

less server.log: only a part of the query [from the beginning], and allows the user to read the file before and after the arrow back and forth [to].
After executing the command less server.log enter: / aaa, aaa may contain query information from already check out the contents in
less exit the display information: Press ESC --- Press ":" q --- --- enter the knockout round

cat server.log: once to display the contents of the entire file on the screen, if the file is longer, it will quickly scroll on the screen.
To prevent this effect, use the cat filename.txt | less command.
Using the pipe (|) and the less command displays the file page by page. Then, you can use the up or down arrow key to move forward or backward through the pages.



 

 

 

 

 

 

 

 

 

 

 

 

 

 


Guess you like

Origin www.cnblogs.com/wbsbxh/p/12110832.html