Vfs is a virtual file system (it's also vfs) that exposes a linux like console and supports most of the common commands. It stores the files in encrypted and compressed format.
- Linux like commands.
- Encrypted with
aes-256-gcm
with key provided by user. - Compressed using
snappy
compression algorithm. - SHA-2 checksums to check file integrity.
Offset | Hex | Description |
---|---|---|
0 | 76 66 73 00 |
The magic bytes vfs\0 |
4 | 00 00 00 00 00 00 00 00 |
The length of the meta-data |
12 | 00 00 00 00 00 00 00 00 |
The offset of the meta-data |
Note: The hex bytes for offsets 4 and 12 are an example and are not fixed. They depend on the contents stored in the file system.
-
- usage:
ls
- description: List all the entries in the current working directory.
- usage:
-
- usage:
rm <file path>
- description: Remove a file with the path specified.
- usage:
-
- usage:
cd <folder path>
- description: Change the current working directory to the path specified.
- usage:
-
- usage:
cp <from path> <to path>
- description: Copy a file from one location to another.
- usage:
-
- usage:
mv <from path> <to path>
- description: Moves a file from one path to another. Can also be used to rename
- usage:
-
- usage:
pwd
- description: Prints the current working directory.
- usage:
-
- usage:
cat <file path>
- description: Prints the contents of a file to the console.
- usage:
-
- usage:
help
- description: Prints this message to the console.
- usage:
-
- usage:
exit
- description: Writes metadata, closes the file and exits the application
- usage:
-
- usage:
nano <file path>
- description: Edits the contents of the file with the given path.
- usage:
-
- usage:
reset
- description: Resets the metadata, zeroes all data and exits.
- usage:
-
- usage:
touch <file path>
- description: Creates a file and opens write mode to type your contents.
End the stream by typeing
<< EOF
.
- usage:
-
- usage:
mkdir <dir_path>
- description: Create a dir at the given path with the last item being the dir name
- usage:
-
- usage:
rmdir <dir_path>
- description: Removes a directory recursively.
- usage:
-
- usage:
import <from path> <to path>
- description: Imports a file from the device and adds it to the Vfs.
- usage:
-
- usage:
export <from path> <to path>
- description: Exports a decrypted file from Vfs to the device.
- usage:
-
- usage:
check
- description: Checks the integrity of the stored files.
- usage:
-
- usage:
defrag
- description: Defragments the Vfs and removes the free areas in between.
- note: Currently this feature is not yet implemented.
- usage: