DEV Community

csm
csm

Posted on

pwd in rust

A reimplementation of the Linux command pwd (Print Working Directory) in Rust.

link to repo

Overview

pwd displays the full path of the directory you are currently in.

Example:

pwd
Enter fullscreen mode Exit fullscreen mode
/home/csm/Documents
Enter fullscreen mode Exit fullscreen mode

Development Environment

  • Operating System: Linux Mint
  • Rust Toolchain

Building the Project

  • clone the repo
  • cd into the cloned repo
  • to build:
cargo build --release
Enter fullscreen mode Exit fullscreen mode
  • to build and run:
cargo run -- -help
Enter fullscreen mode Exit fullscreen mode

Commands

    pwd <no args>        -> Print working directory logical path
    pwd -version,  -v    -> Print pwd version
    pwd -help,     -h    -> Print pwd commands list
    pwd -logical,  -l    -> Print working directory logical path
    pwd -physical, -p    -> Print working directory physical path (resolving sym-links)
Enter fullscreen mode Exit fullscreen mode

License

MIT

Top comments (0)