You can also watch this video at YouTube (but with ads).
MacMost Now 233: Using Terminal to Copy Files
Comments: 27 Responses to “MacMost Now 233: Using Terminal to Copy Files”
Comments Closed.
You can also watch this video at YouTube (but with ads).
Thanks for the tip!
To place volumes/folders/files names; Instead of typing it in the terminal, you can open a Finder window, then locate the desired source (or destination), then simply drag-and-drop the object inside the Terminal window. The complete path will be entered automatically by Unix at the cursor position.
Man, you really made my day! I was stuck with my whole itunes library, and no possibility to copy it back to a newly formatted FAT32 external drive. I wish I had found your post earlier. Would have saved me some precious time. You're first in my bookmarks now!
Thanks. I had exactly the same problem with the stupid Finder.
You da man!
You helped me recover over 90 gigs from my external hard drive thank you so much
I need to know how to do this :(
Good God. Finally a clear answer! Where has this video been hiding all my life?
Thank you! 65GBs of music was painstaking! More people should know about you.
This works:
cp -rpv "/Volumes/Untitled" ./
But this does not work:
cp -rpv "/Volumes/Untitled/Documents\ and\ Settings/Grim/My\ Documents " ./
Note: The path were obtained by dragging the folder into terminal so I know I don't have a type. Any help would be appreciated.
Thanks
The forward slashes \ are used to tell the terminal there is a space in the name. Putting the whole path in quotes tells the terminal that the \ are really in the file name, which they are not. So either get rid of the quotes or the forward slashes and it should work just fine.
That's a backslash.
Thank you so much for this tutorial! You really made my day!
I used your command to copy the entire HDD from my girlfriends MacBook to an external HDD.
Best regards,
Pieter
I have this running right now in my terminal! Thank you SO much for this quick and easy tutorial! This is JUST what I was hoping to find!!
I've been hunting for a mac app to do a better job of copying files, and now I don't need one, and I can feel cool using Terminal!
I use it this way to prevent a file from being overwritten at the destination:
cp -rpn /Volumes/HardDrive/PHOTOS/2010 ./
also, I learned if you end the directory with a slash, it will only copy the contents, not the actual directory. such as:
/Volumes/HardDrive/PHOTOS/2010/
Well... You got me closer than finder, however, Resource busy messages keep popping up and halting the whole procedure. So much for Terminal bypassing troublesome files.
what is the last button i shoul'd hit???
What do you mean? Can you be more specific?
you are greAAAAAAT MAN thanks a lot
Hi I tried typing this in cp -rpv "Final cut tutorials" ~/Volumes/"External 1TB" it found the files however said no such file or directory after each one. What did I do wrong? I was moving a folder from my desktop to an external hard drive.
That doesn't look right. Why the ~ before the destination? What happens when you just use the Finder to do the copy?
Great tip- I was having issues copying a large music collection from one external hd (fat32) to another. Your tip and great tutorial worked like a charm. Thank you again for the post!
Great tutorial, though I have had a problem. I am trying to copy "Documents" to my external hard drive.
I use:
cp -rpv "Volumes/The Hard Drive/Users/myname/Documents" ./
All my output comes out with "./Documents/*filename*: No such file or directory"
Then the final line says: "Volumes/The Hard Drive/Users/myname/Documents: unable to copy ACL to ./Documents: Read only file system"
When I check the contents of the external, nothing has happened
Works like a charm where neither Disk Utility or Disk Warrior could be of any use. Started up with install disk and launched Terminal, followed your instructions and Voilá! Copied all my data to a external usb drive after HD failure (invalid node structure). Couldn´t even mount the corrupted HD in target mode. Reinstalled system and activated Time Machine in case of further problems with the drive.
Merci beaucoup!
The North Front
Thanks Gary.
Hi there all,
My Hard Disk crashed (OSX Lion) (invalid node & I/O error) and could be repaired even using DWarrior, and this video solution helped me but it only worked with me this way:
1- booted my mac while pressing on the alt key
2- choose HD recovery
3- opened terminal
4- used the command given in this video and worked like a charm
a good read that helped me too is ----://aleman.lsnepal.com/2011/10/using-terminal-to-transfer-files-from.html
hope this helps you all
Gary, your the man as I recovered all my data thanx to you
if i want to copy all the files from a cd to a usb?
Just drag and drop in the Finder. No need to use Terminal for that.