Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8131757
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T09:10:35+00:00 2026-06-06T09:10:35+00:00

How to get complementary lines from two text files? File file1.txt has 123 foo

  • 0

How to get complementary lines from two text files?

File file1.txt has

123 foo
234 bar
...

File file2.txt has

123 foo
333 foobar
234 bar
...

I want to get all lines in file1.txt and not in file2.txt. The two files are hundreds of MB large and contain non-ASCII characters. What’s a fast way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T09:10:36+00:00Added an answer on June 6, 2026 at 9:10 am

    Lines, specifically?

    fgrep -vxf file2.txt file1.txt
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Get picture file relative path from diffrent location. my Address pic file like ~/Uploads/Picture/Commodities/1390/11/TumbDesert.jpg
We get a large amount of data from our clients in pdf files in
i get a valid fd object from a caller. How can i find out
I have two lines: Line1 and Line2. Each line is defined by two points
Get the following error periodically in an IIS application: Failed to load resources from
Get sunrise time and sun set times from xml from web. This is the
//get the current member count $sql = (SELECT count(member_id) as total_members from exp_members); $result
// GET: /Product/Delete/5 public ActionResult Delete(int id) { var res = (from r in
get this from my database: 252.587254564 Well i wanna remove the .587254564 and keep
GET Method, it works fine. url: http://myurl.com/test.html?query=id=123&name=kkk I do not have concepts of POST

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.