wiki:LindFileSystem

Lind File System Utilities

For security reasons, Lind supports its own file system and applications running on Lind can only interact with this file system. Before running an application on Lind, you need to make sure the application binary and other files the application expects to be available are present in the Lind file system.

For performing the much needed file system operations like creating a blank file system, creating directory, copying files into the Lind file system from a POSIX file system, removing files and directories, listing files and directories, etc. we support a Lind file system utility. Its code is available at lind_fs_utils.py.

Currently, we focus on baseline functionality. Very trivial things, like changing file permissions, can be handled with the appropriate system call directly and thus are not implemented here. More complex things can be handled via fuse and / or added later. This module may be used directly from the command line or imported.

Supported Function Calls

Usage: lind_fs_utils.py [commandname] [options...]

Where commandname is one of the following:

  • help : print this function call list and the usage
  • usage : print this function call list and the usage
  • mkdir dir1 [dir2...] : create a directory
  • cp root file1 [file2...] : copies files from the root into the Lind file system. For example, cp bar /etc/passwd /bin/ls will copy bar/etc/passwd, bar/bin/ls as /etc/passwd, /bin/ls
  • find [startingpath] : print the names of all files / paths in the file system. This is much like 'find /'
  • format : make a new blank fs, removing the current one.
  • deltree dirname : delete a directory and all it contains
  • rm file1 [file2...] : delete a file
  • rmdir dir1 [dir2...] : delete a directory
  • update root file1 [file2...] : copies files from the root into the lind file system if they are different. For example, cp bar /etc/passwd /bin/ls will copy bar/etc/passwd, bar/bin/ls as /etc/passwd, /bin/ls.
Last modified 4 years ago Last modified on Sep 27, 2013 1:43:48 PM