Copy HD or individual/folders files via Terminal?

Discussion in 'macOS' started by kimfjeld, Dec 4, 2012.

  1. kimfjeld macrumors newbie

    Dec 4, 2012
    I need to format the HD and reinstall the system on my iMac, but first I'd like to extract some files. I did actually back up these files, but the main backup drive got corrupted as well just the day after while I prepared to mirror it. Talk about irony! Thus it has become critical to save the files while I can.

    Since one can access utilities via the Installation DVD, I have an idea that you could access, view and individually copy files and folders with commands in Terminal, as long as you have the username and the password to the system and remember the different roots. If this is correct, can anyone help me go through the necessary commands?

    I guess a secondary solution would be to mirror the HD, which can be done with Disk Utility, but I'm really not interested in backing up an entire corrupted system. As said, I need a new system. If I however do so, could I still access individual folders and files from within this backup from it's backup drive?
  2. switon macrumors 6502a

    Sep 10, 2012
    ditto, rsync...

    Hi kimfjeld,

    You might want to look into the "ditto" and "rsync" Terminal commands, as these will copy directory trees without giving up and with preserving ownerships and permissions. Their manpages, "man ditto" and "man rsync", explain how to use them and provide numerous examples.

    Good luck,
  3. kimfjeld thread starter macrumors newbie

    Dec 4, 2012
    Thank you. I will have a try then.

Share This Page