Coder Social home page Coder Social logo

cdp's Introduction

cdp

cdp is a utility that copies files from one file to another. Its intention is to be as quick as possible, and faster (more reliable) than dd.

Features

  • cdp is "fool proof" in the sense that you cannot overwrite a partition with nonsensical data.

Flags

  • Input file (file to be copied from) can be defined with --input-file
  • Output file (file to copy to) can be defined with --output-file
    • If --output-file is not specified, the file defined with ``-input-file` will be written to stdout.
  • If you are writing to a partition/drive, you MUST specify --force-partition. This is to avoid accidental data loss.
    • NOTE: When cdp is done writing data to a partition/drive, it will automatically execute sync(1) for you.

Example

This is an example usage of all features presented in cdp.

Partition Blocking

# /dev/sda is a system partition -- we are running our machine on it.
$ cdp --input-file example.iso --output-file /dev/sda1 --drive /dev/sda
[ INFO ] You are not using --force-partition, this will certainly lead to trouble.
[ INFO ] /dev/sda1 is a system partition. I am not writing data to this partition.

Writing to stdout

$ cat << EOF > foo
Example file to be printed to stdout
EOF
$ cdp --input-file foo
Example file to be printed to stdout.

Writing to a file

$ cat << EOF > foo2
This file will be copied to foo3
EOF
$ cdp --input-file foo2 --output-file foo3
$ cat foo3
This will be copied to foo3

Compiling

You may compile CDP using this command. It is recommended that you do not compile cdp, rather, use one of the releases.

$ make

To install CDP, run

$ sudo make install

This will install cdp to /usr/local/bin/cdp

cdp's People

Contributors

abxxbo avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.