kpy

Crates.iokpy
lib.rskpy
version0.1.0-alpha
sourcesrc
created_at2021-08-22 16:44:31.107454
updated_at2021-08-22 16:44:31.107454
descriptionA reimplentation of linux's cp in rust
homepagehttps://gitlab.com/NamingThingsIsHard/linux/kpy
repository
max_upload_size
id440763
size60,595
(LoveIsGrief)

documentation

README

A reimplementation of cp in rust.

USAGE:
    kpy [FLAGS] [OPTIONS] <paths>...

FLAGS:
    -h, --help             Prints help information
    -l, --link             Make hard links instead of copying
    -s, --symbolic-link    Make symbolic links instead of copying
    -V, --version          Prints version information

OPTIONS:
        --parents-stripped <parents-stripped>
            Remove X components from the parent and tack onto destination (use as prefix)


ARGS:
    <paths>...    FILE DIRECTORY | DIRECTORY DIRECTORY | FILE1 FILE2 ... DIRECTORY

Process finished with exit code 0

Why?

I needed --parents-stripped in the original cp but couldn't find it. It's something I use more often and I don't want to keep writing a script with awk, sed, cut or whatever in order to achieve what a CLI option could do. Additionally, it has a limited scope and is a nice way to learn rust.

Dev

Install Rust (which will include cargo).

Build

cargo build --bin kpy

Run

cargo run kpy

Commit count: 0

cargo fmt