|
Comparing a distinct value in 1 list with another list
Hi all,
I need to compare the contents of 2 directories where the file contents are similar and take out the filenames whose contents does not exist within the 2 directories.
Directory1
1
2
3
4
Directory2
54
55
56
57
Does anyone has a script which can do this?
At the end of the command, all the files that does not exist when comparing the 2 directories should be cp -p to another new directory.
Thanks.
|