skip to main | skip to sidebar

ET Notes

Thursday, October 14, 2010

Compare contents of 2 directories

$ MMM=mydir
$ comm -12 <(ls /usr/local/mypath/$MMM) <(ls ./$MMM)

-1 remove left hand contents
-2 remove common contents
-3 remove right hand contents
Posted by Michael at 11:56 AM

No comments:

Post a Comment

Newer Post Older Post Home
Subscribe to: Post Comments (Atom)

Blog Archive

  • ►  2012 (1)
    • ►  July (1)
  • ►  2011 (7)
    • ►  August (2)
    • ►  July (1)
    • ►  April (2)
    • ►  March (1)
    • ►  January (1)
  • ▼  2010 (10)
    • ►  November (1)
    • ▼  October (5)
      • Transferring using ssh and pipes.
      • MySQL temp files in data
      • vim use sudo to save changes.
      • Verify that a file has constant number of fields.
      • Compare contents of 2 directories
    • ►  August (1)
    • ►  July (1)
    • ►  February (2)
  • ►  2009 (4)
    • ►  December (1)
    • ►  May (2)
    • ►  March (1)
  • ►  2008 (5)
    • ►  August (2)
    • ►  June (1)
    • ►  February (2)
  • ►  2007 (11)
    • ►  November (1)
    • ►  October (1)
    • ►  September (1)
    • ►  July (2)
    • ►  June (4)
    • ►  May (1)
    • ►  April (1)

About Me

Michael
View my complete profile