课程: Ubuntu Linux: Essential Commands
今天就学习课程吧!
今天就开通帐号,24,700 门业界名师课程任您挑!
Compare non-text files
- [Instructor] Though we can't usually make sense of differences in binary files ourselves as we can when comparing text files line by line, we can compare their type, their size, and other secondary aspects of them. We can even compare the contents. Though at a byte for byte level rather than reading differences in words. Comparing binaries byte for byte can be accomplished with the cmp command line tool which will tell you where files differ. Here we can compare our text files from earlier. But instead of interpreting them as eight bit ASCI text, we read them for their byte values directly. Cmp without any other options, tells us the location or address of where the first difference in the files exists. If they're identical, you'll just get no output. Here I can see that these files begin to differ at byte 27. To see a list of all the locations where the bytes differ, You can use the -l option. I'll write cmp -l text1.txt text2.txt. And here's a list of all of the different bytes…
内容
-
-
-
-
(已锁定)
Files on Linux10 分钟 27 秒
-
(已锁定)
Text files8 分钟 52 秒
-
(已锁定)
Work with files and directories10 分钟 16 秒
-
File links7 分钟 27 秒
-
(已锁定)
Finding files4 分钟 40 秒
-
(已锁定)
Input/output redirection6 分钟 18 秒
-
(已锁定)
Compare text files4 分钟 43 秒
-
(已锁定)
Compare non-text files3 分钟 20 秒
-
(已锁定)
Compress and decompress files9 分钟 12 秒
-
(已锁定)
Explore regular expressions3 分钟 36 秒
-
(已锁定)
Change files programmatically4 分钟 42 秒
-
(已锁定)
-
-