diff command
play

diff Command JACARY RICHARDSON NHANTRUNG PHAN Unix/Linux Command: - PowerPoint PPT Presentation

diff Command JACARY RICHARDSON NHANTRUNG PHAN Unix/Linux Command: diff The diff utility is at its very base a data comparison tool Generally, the diff command compares two files in the following format: diff filename1 filename2


  1. diff Command JACARY RICHARDSON NHANTRUNG PHAN

  2. Unix/Linux Command: diff  The diff utility is at its very base a data comparison tool  Generally, the diff command compares two files in the following format:  diff filename1 filename2  If you use a filename of just “ - ”, you can compare text from the standard input with a different file  diff is a line-oriented comparison tool and tries to find the smallest numbers of insertion and deletions to create one file from the other  Diff options begin with a “ - ” so you can’t use a file whose name starts with a “ - ”

  3. diff options  -a: Treat all files as text files  -b: Ignore changes in amount of white space (such as spaces or tabs)  -B: Ignore changes in amount of blank or empty lines  -e: Create an editing script that contains a sequence of commands to change one file’s contents to another that can you used in the editing programs ed/ex  -i: Ignore difference in cases (upper and lower case characters are treated the same)  -y: Display output in two columns

  4. Lines that aren’t changed aren’t • shown in diff In standard output a = add, c = • changed, and d = deleted Line numbers of the first file are • shown before a/c/d and line numbers of the second file are displayed after < is a deletion line showing that • the line is deleted in the second file > is an addition line that shows • the line is added in the second file

  5. Works Cited  http://linux.about.com/library/cmd/blcmdl1_diff.htm  http://www.computerhope.com/unix/udiff.htm

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend