2 Replies Latest reply on Aug 20, 2007 6:25 PM by littlescripter

    difference between cp and dd command

    littlescripter
      Hi Friends!

      Please tell the difference between cp and dd command
      which one is the best in terms of time,correctness

      Thanks in advance
        • 1. Re: difference between cp and dd command
          506787
          dd works on the file you specify, making it able to copy data between devices, or from a device to a file. This is commonly used for moving data if devices specifically are involved (create an iso image from a cd-rom disc for example: dd if=/dev/cdrom of=mycdrom.iso), or backup raw devices (sometimes used in RAC databases: dd if=/dev/raw/raw1 of=device_raw1)

          cp is used for duplicating file content to a new file or to a new location. things you specifically want there are preservation of ownership, timestamp and mode (rights), and being able to recurse the operation (=being able to copy directories).
          • 2. Re: difference between cp and dd command
            littlescripter
            Thank you frits hoogland