Some foods last longer than others. here are a few things that last awhile in the pantry, and are worth stocking up on when they go on sale (esp if you also have coupons!). Remember to date things and try to eat with a first in, first out rule:
white rice (the brown stuff gets rancid)
white flour (the whole wheat gets rancid)
vinegar preserved foods
many sugared foods, like jelly (sugar is antimicrobial)
many condiments, esp mustard
Most oils go off fairly quickly once opened. I am not sure how long they last unopened.
What else? I am by no means an expert in this, and would love to know what people's experiences are in food storage and preservation.