Results 1 to 4 of 4

Thread: How to merge 2 hosts files

  1. #1
    Join Date
    Nov 2005
    Posts
    80

    How to merge 2 hosts files

    Hello to you all,
    I searched in vain for how to merge text files - hosts in my case - for there are double lines ...
    Is there a software that allows multiple reconnet lines and delete them?

    All responses are welcome
    Thank you!

  2. #2
    Join Date
    Dec 2007
    Posts
    2,291

    Re: How to merge 2 hosts files

    Yes with HOSTS manager, downlaod it here.

  3. #3
    Join Date
    Nov 2005
    Posts
    80

    Re: How to merge 2 hosts files

    I know, but I did not know we could easily merge!
    Thank you and good evening!

  4. #4
    Join Date
    Oct 2004
    Posts
    1,342

    Re: How to merge 2 hosts files

    I would try this:

    - get both host files on the same system. Call them host1 and host2

    - merge them like this:

    cat host1> tmphost
    cat host2>> tmphost

    - visually verify the merge:

    pg tmphost

    - filter the merged file:

    cat tmphost|sort|uniq >tmp2host

    - visually verify the new file:

    pg tmp2host

    Now it should be a simple job of removing any remaining duplicates using vi. When done you can copy the file to /etc/hosts and HUP the appropriate services or reboot.

Similar Threads

  1. How to meld multiple large huge hosts files on Ubuntu?
    By Souman in forum Operating Systems
    Replies: 10
    Last Post: 01-12-2011, 09:00 PM
  2. Preparing hosts and networks files in Linux
    By Leoniee in forum Tips & Tweaks
    Replies: 2
    Last Post: 06-03-2011, 07:51 AM
  3. Detail of MVPS HOSTS files
    By Shakirah in forum Technology & Internet
    Replies: 4
    Last Post: 31-10-2010, 12:24 AM
  4. How to merge SWF files
    By Sara.S in forum Software Development
    Replies: 3
    Last Post: 29-06-2009, 09:53 PM
  5. How to merge vob files as one
    By Patio in forum Windows Software
    Replies: 3
    Last Post: 12-06-2009, 05:50 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,713,281,579.68082 seconds with 17 queries