Results 1 to 4 of 4

Thread: How to copy the specific file using “dd” command

  1. #1
    Join Date
    Sep 2010
    Posts
    22

    How to copy the specific file using “dd” command

    I using an HCL Me laptop with various partition and running on different operating systems. All this partitions are occupied by data. Now I wanted to copy the specific data from the first partition to another hard disk and from other partitions to the first partition. If anyone knows how to copy a specific part of the hard drive to another drive using dd command then please tell me. Any suggestions will appreciate. Thanks in advance.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: How to copy the specific file using “dd” command

    Here I have given you some command follow those to copy the contents of your hard drive to another. Suppose your first hard drive name is /dev/sda1 and another hard disk name is /dev/sdb1, then to copy the content from the first drive to second drive give this command “dd if=/dev/sda1 of=/dev/sdb1.” In the following command “if” represents the source and “of” represents destination for the coping the files. When copying the files from one hard drive to another “dd” just read the bytes from the first partition and writes them to the second partition and vice versa.
    Last edited by Praetor; 09-11-2010 at 05:11 PM.

  3. #3
    Join Date
    May 2008
    Posts
    2,012

    Re: How to copy the specific file using “dd” command

    I think you should try "cat" command instead of "dd" command, because I think cat command will be easy to run and understand for you. Using this command you can copy from the source drive sda and then, paste to the adb. But for that first you have to copy all the partitions to sdb1. After copying all the partition run this command to copy to the target location.
    • cat /dev/adb1 >> /dev/sdb1
    • cat /dev/adb2 >> /dev/sdb1
    • cat /dev/adb3 >> /dev/sdb1
    • cat /dev/adb4 >> /dev/sdb1

    Try out this command to copy the files.

  4. #4
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to copy the specific file using “dd” command

    I have gone through your question and I have found this command to create the image same as copying the file.
    For that mount /dev/sdb1 to another location using this command
    • mount

    /dev/sdb1
    /mnt/tmp
    Then run this command for create the image of sda2 and will paste to the sdb1 and the name will be the default like sda2.img.
    • dd

    of=/mnt/tmp/sda1.img
    I hope this information may help you.

Similar Threads

  1. How to copy specific rows to another sheet
    By Jayden in forum Windows Software
    Replies: 1
    Last Post: 21-04-2009, 09:59 PM
  2. 'The semaphore timeout period has expired.' error with command File.Copy
    By Chandrakant81 in forum Software Development
    Replies: 2
    Last Post: 02-02-2009, 06:54 PM
  3. Create your own Run Command for any specific Application
    By Computer_Freak in forum Tips & Tweaks
    Replies: 1
    Last Post: 26-01-2009, 02:17 PM
  4. Copy the results of a DOS command
    By Reegan in forum Tips & Tweaks
    Replies: 0
    Last Post: 17-10-2008, 04:42 PM
  5. Command prompt "COPY" command not working in brand new Windows Vis
    By CMD COPY command not working in Vista in forum Vista Help
    Replies: 7
    Last Post: 06-02-2008, 02:50 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,711,705,137.59844 seconds with 17 queries