Results 1 to 4 of 4

Thread: "diff" command

  1. #1
    "diff" command

    Member Since
    Apr 19, 2010
    Posts
    2
    "diff" command
    Is there anyway to run diff on terminal to find identical data. For example let's say I have two files of e-mails. My boss wants me to find which e-mails overlap in both files. How do i run this diff in terminal?

  2. #2
    "diff" command
    bobtomay's Avatar
    Member Since
    Dec 22, 2006
    Location
    Texas, where else?
    Posts
    26,206
    Specs:
    15" MBP '06 2.33 C2D 4GB 10.7; 13" MBA '11 1.8 i7 4GB 10.10; 21" iMac '13 2.9 i5 8GB 10.10; 5s & 5c
    Moved post to it's own thread. Please don't post new questions on unrelated 3 yr old threads. People tend to notice that when they open it up and pass on responding. Thanks

    Sorry, can't help... I'm one of thise GUI types.
    I cannot be held responsible for the things that come out of my mouth.
    In the Windows world, most everything folks don't understand is called a virus.

  3. #3
    "diff" command
    xstep's Avatar
    Member Since
    Jun 25, 2005
    Location
    On the road
    Posts
    3,231
    Specs:
    2011 MBP, i7, 16GB RAM, MBP 2.16Ghz Core Duo, 2GB ram, Dual 867Mhz MDD, 1.75GB ram, ATI 9800 Pro vid
    Have to assume you are running some kind of script. Check $status immediately upon return. Also, I think you'll want to use '-q' to limit differences that are spit out, and send any output to /dev/null.
    CameraTime - Time lapse photography for novice and advanced users.

    When asking questions, post the version of your software. You'll receive better answers.

    Please post your results to the thread as it is good feedback.

  4. #4
    "diff" command

    Member Since
    May 27, 2010
    Posts
    21
    That's easy if I understand your question. In a Terminal window, type "diff" and then the names of the files you want the computer to compare. For example, if you want to compare the contents of two text files you can write something like this: "diff telegram.txt letter.txt". If the files differ, the computer will tell you about the first difference it finds. If the files are the same, it won't say anything about them. To compare files side by side, use sdiff instead of diff.

    Naturally, you probably won't use the quotation marks when you type the command. But you will need quotation marks if your file names contain spaces.

    Quote Originally Posted by y2j164 View Post
    Is there anyway to run diff on terminal to find identical data. For example let's say I have two files of e-mails. My boss wants me to find which e-mails overlap in both files. How do i run this diff in terminal?

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. "Empty the browser's cache" - Can we trigger this command from the server ?
    By michelangelo in forum Web Design and Hosting
    Replies: 3
    Last Post: 07-30-2015, 08:47 AM
  2. "command+shift+P" hotkey doesn't work in Colemak
    By markbellaire in forum OS X - Operating System
    Replies: 2
    Last Post: 04-09-2014, 02:29 PM
  3. OnyX - Push "Command & R" but get 'Do Not Enter' symbol
    By ReelDeal in forum OS X - Apps and Games
    Replies: 1
    Last Post: 12-24-2012, 01:18 PM
  4. Replies: 1
    Last Post: 06-12-2012, 05:39 PM
  5. enable "Duplex Printing Unit" in command prompt?
    By trey5498 in forum OS X - Development and Darwin
    Replies: 3
    Last Post: 01-25-2012, 01:04 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •