standard output from a specified point, and tail-f can view the log files that are being played out, allowing you to see the latest log log.Command syntax:Usage:tail [-F |-f |-r] [-Q] [-B # |-C # |-N #] [file ...]Command instance:-F: Monitor file growth;? ping www.cnblogs.
default value of the number of displayed rows is 10.Option:-C,-bytes = size indicates the first size bytes.-N,-lines = Number specifies the number of rows in front of the display. The default value is 10.-Q,-quiet, -- silent does not display the title of the given file.-V,-verbose always displays the title of the given file.Example:# Head-5 file (display the first five lines of
displaying the number of rows is 10.Options:-c,-bytes=size Displays the preceding SIZE bytes.The value of-n,-lines=number number specifies how many lines are displayed earlier. The default is 10 rows.-q,-quiet,--silent does not display the title of the given file.-v,-verbose always displays the title of the given file.Example:# head-5 file (shows the first 5 lines of the files)# head-v
text must be written in a logical page.Each logical page has a header, a body, and a footer section (which can have an empty section).Unless you use the-P flag, the NL command re-sets the line number where each logical page begins. Row calculation flags can be set separately for header, body, and footer sections (for example, header and footer lines can be computed but text lines cannot).Usage examples:Example one: List the contents of Log2012.log wi
Tags: display loop read standard ctrl TTL post refresh view file nameTail display text Footer command English intent
Tail
Command format
tail[必要参数][选择参数][文件]
Command function
The tail command writes the file to standard output starting at
/etc/|less–enmiv.Head command1, first man under head. -N display number of rows-C display of bytes-Q Hide file names2, common examples[[email protected] test]# head-n 3 test.txt #只打印前3行这里是第一行 This is the third row, the second line is a blank line[Email protected] test]# head-n-3 test.txt# print start to the 4th line, is to cut down the last 3 lines. Here is the first line here is the third row, the second row is a blank line here is the fourth row, th
Tags: target blog get log self-learning Linux view command inux file Linux commandClick Back to learn the path of the Linux command line and shell script3.6-Files View command file cat more less tail headlsThe command is used to display a list of file directories, Windows si
Text File View commands: Cat, TAC, more, less, tail, head, touchCat: Start all of the file contents from the first lineThe cat command is a concatenate (continuous) shorthand for displaying the contents of the entire file on the screen, so there is a problem with the cat command, that is, when the entire
help manual.
■ Head command
● Default options
If no option is specified, for example, if head f. Java is executed, all contents of the f. Java file are displayed.
●-N Option
Displays the first n rows of the specified file. N is an integer. :
The first two lines of the f. Java file are displayed.
In addition, the header information of multiple files can be displa
Cat, more, and less are commonly used. In addition, if you want to view a large file (several hundred MB), but we only need the following lines of words, you need to use the tail command, Tac command can also be used for this purpose.
CatSyntax for displaying file content starting from the first line: CAT [-abeensttuv] [-- help] [-- version] filenameNote: connec
Command formattail [OPTION] ... [FILE] ...Command parameters-C,--bytes=[-]kDisplays the post-K-byte contents of each file.-F,--follow[={name|descriptor}]Continuously monitors the specified file, and when the file appends content, the new content is immediately displayed on the screen.-N,--lines=[-]kDisplays the followi
=never not display color (always display color, Auto automatically judge)LS--full-time output in full time mode(2) Copy, delete and move (CP,RM,MV)Cp-a/var/log/wtmp wtmp_test Copy all of the file's features pastCp/var/log/wtmp. Copy to current directoryCp-i if the target file exists, the overwrite asks for the actionCp-p is copied along with the
Tail tailui
Tail is a real-time file monitoring and Viewer based on command lines. It is a Windows Port for Unix 'Tail-F' commands.
Tail can quickly display the end of a large file without loading the entire
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: Page-by-page display of file contents5.less: Similar to more, but better than more, it can page forward6.head: Only a few lines
When using a flumeng1.3.1 tail file to collect logs to HDFS, it is found that the last few lines of data in the original log file cannot always be written to the HDFS file, even if HDFS rolls into a new file by size or time.
When
Text File View commands: Cat, TAC, more, less, tail, headCat: Start all of the file contents from the first lineTAC: Displays the contents of all files from the last lineMORE: Page-by-page display of file contentsLess: page-by-page display of file content, but allows page fo
Mysql slave database Last_IO_Error: Got fatal error 1236 from master when reading data from binary log: 'Could not find first log file name in binary log index file' error handling, gotfatalerror1236
You will be back later to view the mysql running status and backup status,
Tags: Display service Special Search dynamic display cannot space function BSPTouch/bin/touch Creating an empty fileLinux Create files can use special symbols, exceptTouch test Test1 created two filesTouch "Test Test1" creates a file with spaces in the file nameTouch ' Test test1 ' created a file with spaces in the file
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.