How to use Mac Terminal to copy and move files

Sometimes you can’t copy lot of files from CD or DVD using Finder. So you need to learn how to use mac terminal to copy and move files.
So how to use terminal to copy files ?

  1. First open Terminal from /Applications/Utilities/
  2. Type df which will list all different drives and devices attached.
  3. Select the drive name and copy it. So you can paste it in command exactly as it appears here. Mac Terminal copy files
  4. Next you need to go to the place where you want to paste these files. Here i want to go to my documents folder. Type cd /users/your-usersname/documents (replace your-usersname with your original mac user name).
  5. Now use cp command. Ex : cp -rpv “/Volumes/iPhoto Library – 2003-2005” ./
  6. Then press Return.
  7. If you are copy the wrong files and you want to break the process, just press ctrl+c.

If you want to copy a file to clipboard?
Ex file name is hello.html. Open terminal and type

$ cat ~/Desktop/hello.html | pbcopy

Now that html file is in the clipboard.
If you want to paste somewhere else, use.

$ pbpaste > ~/Documents/hello.html
4:00 pm

Leave a Reply