Need help understanding script command

We use a UNIX-based system (Lawson) at work and I was given this command to request a data extract from the db admin. The only thing I really understand is the last line as it appears to be joining the files created from the first three lines into one. Is there anyone who can help me breakdown the rest of the code. I assume "find" means exactly what it states and I think "grep" is extracting whatever is found. But what about the rest of the syntax in red, green and blue. And what does "/tmp" mean?

find /opt/app/lawprod/ \* -exec ls -l {} \; |grep Oct | grep -v " 200" > /tmp/oct
find /opt/app/lawprod/ \* -exec ls -l {} \; |grep Nov | grep -v " 200" > /tmp/nov
find /opt/app/lawprod/ \* -exec ls -l {} \; |grep Dec | grep -v " 200" > /tmp/dec
cat /tmp/oct /tmp/nov /tmp/dec > /tmp/oct-dec

Thank you.
Kevin

Its looking for files in the directory /opt/app/lawprod/ if the date is Oct them it put the results in the /tmp/oct

same for Nov and Dec.

then puts all the results from Oct, Nov and Dec into one file /tmp/oct-dec

/tmp is just a "Temporary" directory that occasionally gets cleared out. You use it to create files you dont need to keep forever.

Thanks Ikon for helping clarify. I knew it was supposed to be looking for files that have changed, I was just curious to learn a little behind the syntax for my own understanding. I took a Linux course a number of years back and can remember using the cat and grep commands, among a few others.

If you don't mind, what do the \* -exec ls -l {} \; and -v " 200" part of the command specify? I saw online that "ls -l" is used to list directory contents in long list format and found something on "-exec" and the "-v" switch for grep, but I'm not sure I understand fully they mean. I'm guessing the output files might be of help, but I haven't received them as of yet.

Thanks again.

Kevin

This executes ls -l for each file "*" that it finds. So it give the file details filename, file size, etc...

-exec ls -l {} \; 

this list the lines that DO NOT have " 200" in them. See example below.

-v " 200"
# cat test.log
John Smith
Bill Smith
Jack Brown
James Brown
Jill Smith
# cat test.log | grep Smith
John Smith
Bill Smith
Jill Smith
# cat test.log | grep -v "Smith"
Jack Brown
James Brown

Ah, I see now. Thanks for providing the example. It makes it much easier to understand. Now I'm wondering why they are excluding anything with 200, but I will pose that question to the DBA.

Thanks again for your help!