This is a creation in
Article, where the information may have evolved or changed.
Used primarily for the latest line view of Web service logs.
Package Main
Import"FMT""OS""Bytes")
Const (Defaultbufsize = 4096)
Func tail (filename string, n int)
When we log or text data on the server side, sometimes there is a need to delete the last few lines of a large file, then how to efficiently implement.Internet browsing finally found the DD command, pro-test as follows, delete a 32GB log file the
The content originates from the people's post and telecommunications press "linux command Application big dictionary"Tell 729 commands, 1935 examplesLearn the Linux system's reference books, desk book, Encounter the command or command options you
1.netstatNETSTAT-TNL | grep 443 (see if Port 443 is occupied)-PNL | grep 443 (also shows the process PID that occupies the native 443 port). -A (all) show all options, default does not show listen correlation -t (TCP) only show TCP-related options
File Content Lookup1.CAT Displays the contents of the file starting from the first line2.TAC: Starting from the last line, you can see that the TAC is the write-down form of cat.3.nl: When displayed, by the way output line number;4.more:
1.netstatNETSTAT-TNL | grep 443 (see if Port 443 is occupied) root user, with Netstat-pnl | grep 443 (also shows the process PID that occupies the native 443 port). -A (all) show all options, default does not show listen related-t (TCP) only show
A bloodcase caused by a lock-free Message Queue: how to be a real programmer? (3) -- location: q3.h and RingBuffer, q3.hringbufferDirectory
A bloodcase caused by a lock-free Message Queue: how to be a real programmer? (1) -- location: Cause
A
"7.1" Directory and Path"7.1.2" directory-related actions
1 Special Directory list:
(1)
2 Directory Operation command, let's talk about a few common processing directory commands bar:
CDS: Transforming Catalogs
PWD: Displaying the current
Common troubleshooting command lines in linux 1. view TCP connection status netstat-nat | awk '{print $6}' | sort | uniq-c | sort-rnnetstat-n | awk '/^ tcp/{++ S [$ NF]}; END {for (a in S) print a, S [a]} 'netstat-n | awk'/^ tcp/{++ state [$ NF]};
Linux-general technology-Linux technology and application information. For more information, see the following. (B) 1. Which command can be used to create the abbreviation or alias of a command?
A. awk
B. alias
C. echo
D. alien
(D) 2. Which of the
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.