On Sun, Mar 09, 2003 at 06:02:13PM -0500, David A. Bandel wrote:
>On Sun, 9 Mar 2003 14:15:42 -0800
>Bill Campbell <[EMAIL PROTECTED]> wrote:
>
>> On Sun, Mar 09, 2003 at 04:42:13PM -0500, Joel Hammer wrote:
>> >Yes, I see ntp listening on both interfaces, too. I adjusted my
>> >firewall  to allow udp and tcp packets from my intranet client, but,
>> >no avail. Well, I'll keep poking at it.
>> >
>> >Thanks for this useful command, lsof.
>> 
>> It's amazing how many useful commands are on Linux and Unix systems.
>> 
>> How many on the list use ``comm''?
>
>not in years.  I prefer diff -u, gives me a better perspective.  To each
>his own.

That's fine for some things, but consider two directories that
are very similar, and you want to find which files are in dir2
that aren't in dir1.

        cd dir1
        find . -type f | sort > /tmp/list1
        cd dir2
        find . -type f | sort > /tmp/list2
        comm -13 /tmp/list1 /tmp/list2 > /tmp/list3

Now /tmp/list3 has a list of all files in dir2 that aren't in dir1.
Perhaps you want to copy all the files from dir2 that aren't in
dir1, now you can run:

        cpio -pdumv dir1 < /tmp/list3

Bill
--
INTERNET:   [EMAIL PROTECTED]  Bill Campbell; Celestial Software LLC
UUCP:               camco!bill  PO Box 820; 6641 E. Mercer Way
FAX:            (206) 232-9186  Mercer Island, WA 98040-0820; (206) 236-1676
URL: http://www.celestial.com/

``Guns are no more responsible for killing people than the spoon is
responsible for making Rosie O'Donnell fat.''
_______________________________________________
Linux-users mailing list
[EMAIL PROTECTED]
Unsubscribe/Suspend/Etc -> http://www.linux-sxs.org/mailman/listinfo/linux-users

Reply via email to