Ferrous
Ferrous is a simple shell implemented in Rust. It supports basic commands, changing the current folder with cf
, and exiting the shell with exit
. The shell also supports command chaining using pipes. Additional commands include copy
, move
, remove
, mem
(memory info), compare
, dirsize
, and tree
.
Project Structure
You can find the detailed code structure here
Prerequisites
Before you can run this shell, you need to install Rust. The easiest way to install Rust is with rustup. Follow the instructions here to install rustup. After you've installed rustup, you can install Rust by running the following command:
rustup install stable
You also need to install the Cargo package manager, which is used to build and run the shell. Cargo is included with rustup, so if you installed Rust with rustup, you should already have Cargo.
Libraries and Crates
Building
To build the shell, navigate to the project directory and run the following command:
cargo build
This will compile the shell and produce an executable file in the target/debug
directory.
Running
To run the shell, you can use the cargo run
command:
cargo run
This will start the shell. You should see a >
prompt where you can enter commands.
Usage
You can use the shell just like any other shell. Here are some examples of commands you can run:
> ls
> cf /
> exit
> copy src dest
> move src dest
> remove path
> mem
> compare file1 file2
> dirsize path
> tree path
Contributing
Contributions are welcome! If you have a feature you'd like to add, feel free to open a pull request. If you find a bug, please open an issue.
Future Work
Here are some potential improvements that could be made to the shell.