一个空间建多个网站的方法,木马设计,哈尔滨优质官网建站企业,WordPress启用插件Linux dd 命令用于读取、转换并输出数据。dd 可从标准输入或文件中读取数据#xff0c;根据指定的格式来转换数据#xff0c;再输出到文件、设备或标准输出。参数说明(dd --help)Usage: dd [OPERAND]...or: dd OPTIONCopy a file, converting and formatting according to th…Linux dd 命令用于读取、转换并输出数据。dd 可从标准输入或文件中读取数据根据指定的格式来转换数据再输出到文件、设备或标准输出。参数说明(dd --help)Usage: dd [OPERAND]...or: dd OPTIONCopy a file, converting and formatting according to the operands.bsBYTES read and write BYTES bytes at a time (also see ibs,obs)cbsBYTES convert BYTES bytes at a timeconvCONVS convert the file as per the comma separated symbol listcountN copy only N input blocksibsBYTES read BYTES bytes at a time (default: 512)ifFILE read from FILE instead of stdiniflagFLAGS read as per the comma separated symbol listobsBYTES write BYTES bytes at a time (default: 512)ofFILE write to FILE instead of stdoutoflagFLAGS write as per the comma separated symbol listseekBLOCKS skip BLOCKS obs-sized blocks at start of outputskipBLOCKS skip BLOCKS ibs-sized blocks at start of inputstatusWHICH WHICH info to suppress outputting to stderr;noxfer suppresses transfer stats, none suppresses allBLOCKS and BYTES may be followed by the following multiplicative suffixes:c 1, w 2, b 512, kB 1000, K 1024, MB 1000*1000, M 1024*1024, xM MGB 1000*1000*1000, G 1024*1024*1024, and so on for T, P, E, Z, Y.Each CONV symbol may be:ascii from EBCDIC to ASCIIebcdic from ASCII to EBCDICibm from ASCII to alternate EBCDICblock pad newline-terminated records with spaces to cbs-sizeunblock replace trailing spaces in cbs-size records with newlinelcase change upper case to lower casenocreat do not create the output fileexcl fail if the output file already existsnotrunc do not truncate the output fileucase change lower case to upper casesparse try to seek rather than write the output for NUL input blocksswab swap every pair of input bytesnoerror continue after read errorssync pad every input block with NULs to ibs-size; when usedwith block or unblock, pad with spaces rather than NULsfdatasync physically write output file data before finishingfsync likewise, but also write metadataEach FLAG symbol may be:append append mode (makes sense only for output; convnotrunc suggested)direct use direct I/O for datadirectory fail unless a directorydsync use synchronized I/O for datasync likewise, but also for metadatafullblock accumulate full blocks of input (iflag only)nonblock use non-blocking I/Onoatime do not update access timenoctty do not assign controlling terminal from filenofollow do not follow symlinkscount_bytes treat countN as a byte count (iflag only)Sending a USR1 signal to a running dd process makes itprint I/O statistics to standard error and then resume copying.$ dd if/dev/zero of/dev/null pid$!$ kill -USR1 $pid; sleep 1; kill $pid183353020 records in183353020 records out9387674624 bytes (9.4 GB) copied, 34.6279 seconds, 271 MB/s需重点查看参数if, of, bs, skip, count示例源数据准备catdd_in.txtabcdEOF二分查看前半部分数据dd bs1 count4 ifdd_in.txtab40 records in40 records out4 bytes (4 B) copied, 9.903e-05 s, 40.4 kB/s二分匹配数据dd bs1 count4 ifdd_in.txt | grep b # 能匹配到dd bs1 count4 ifdd_in.txt | grep c # 不能匹配到二分查看后半部分数据dd bs1 skip4 count4 ifdd_in.txtcd40 records in40 records out4 bytes (4 B) copied, 0.00013476 s, 29.7 kB/s二分匹配数据dd bs1 skip4 count4 ifdd_in.txt | grep b # 不能匹配到dd bs1 skip4 count4 ifdd_in.txt | grep c # 能匹配到示例解释dd bs1 count4 ifdd_in.txtbs1 设置每次查找块大小为1字节(这里数据小用1字节方便说明。在大文件的情况下可以用 1024 这样 1KB 或更大的值加快扫描速度)count4 取4个块区这个值需要配合文件大小计算出前半部分。以上就实现文件二分查找前半部分配合 grep 即可进行查找操作。文件后半部分的查找需要配合 skip跳过块区。