commandlinefu.com is the place to record those command-line gems that you return to again and again.
You can sign-in using OpenID credentials, or register a traditional username and password.
Subscribe to the feed for:
If both file1 and file2 are already sorted:
comm -13 file1 file2 > file-new
There are 2 alternatives - vote for the best!
This command compares file2 with file1 and removes the lines that are in file1 from file2. Handy if you have a file where file1 was the origional and you want to remove the origional data from your file2.
If you can do better, submit your command here.
You must be signed in to comment.