.. zephyr:code-sample:: shell-fs :name: File system shell :relevant-api: file_system_api Access a LittleFS file system partition in flash using the file system shell. Overview ******** This example provides shell access to a LittleFS file system partition in flash. Requirements ************ A board with LittleFS file system support and UART console Building ******** Native Posix ============ Before starting a build, make sure that the i386 pkgconfig directory is in your search path and that a 32-bit version of libfuse is installed. For more background information on this requirement see :ref:`native_posix`. .. code-block:: console export PKG_CONFIG_PATH=/usr/lib/i386-linux-gnu/pkgconfig .. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/fs :board: native_posix :goals: build :compact: See :ref:`native_posix` on how to connect to the UART. Reel Board ========== .. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/fs :board: reel_board :goals: build :compact: Particle Xenon ============== This target is customized to support the same SPI NOR partition table as the :zephyr:code-sample:`littlefs` sample. .. zephyr-app-commands:: :zephyr-app: samples/subsys/shell/fs :board: particle_xenon :goals: build :compact: Flash load ========== If you want to use the 'flash load' command then build the sample with the 'prj_flash_load.conf' configuration file. It has defined a larger RX buffer. If the buffer is too small then some data may be lost during transfer of large files. Running ******* Once the board has booted, you will be presented with a shell prompt. All file system related commands are available as sub-commands of fs. Begin by mounting the LittleFS file system. .. code-block:: console fs mount littlefs /lfs Loading filesystem from host PC to flash memory =============================================== Use command: .. code-block:: console flash load