Like this, kept in a sealed food storage bucket supposedly they will last 20 years or so. But once you grind them into flour, they are only good for a week or two because the oils released can go rancid.
Thats similar to items that will last a few years in their original containers, but need to be refrigerated or used once theyre opened.
Something to consider when deciding on what size cans or bottles of a particular product you are buying a large can is great if you are going to use the contents within a short time or have some refrigeration.
Smaller cans may be comparatively more expensive, but easily used up before they spoil.