An efficient and reliable file storage system is important to micro sensor nodes so that data can be logged for later asynchronous delivery across a multi-hop wireless sensor network. Designing and implementing such a file system for a sensor node faces various challenges. Sensor nodes are highly resource constrained in terms of limited runtime memory, limited persistent storage, and finite energy. Also, the flash storage medium on sensor nodes differs in a variety of ways from the traditional hard disk, e.g. in terms of the limited number of writes for a flash memory unit. We present the design and implementation of ELF, an efficient log-structured flash-based file system tailored for sensor nodes. ELF is adapted to achieve memory efficiency, low power operation, and tailored support for common types of sensor file operations such as appending data to a file. ELF's log-structured approach achieves wear levelling across flash memory pages with limited write lifetimes. ELF also uniquely provides garbage collection capability as well as reliability for micro sensor nodes. A performance evaluation of an implementation of ELF based on TinyOS and MICA2 sensor motes is presented.