Become The Solution Chicago Logo

Robocopy (Robust) For Mac OS X – CP Command Terminal

Robocopy (Robust) For Mac OS X – CP Command Terminal

If you are looking for an alternative to Windows Robocopy for Mac OS X, look no further. The copy files (cp) command in Terminal works just like Robocopy. CP will copy files in OS X and preserve their structure and attributes. You can also see in real-time the files being copied using the verbose switch. Let’s got started.

 

1. Open Terminal (Applications -> Utilities -> Terminal)

 

2. In Terminal, type man cp to output all the CP commands. In this guide, we will only be concerned with the following switches below for our file copies from hard drive to hard drive.

-a         Preserves structure and attributes of files but not directory structure
-p         Preserves all attributes including times, flags, file mode, ACLs.
-v         Make CP verbose so it shows files as they are copied.

*If you were copying files into a directory with similar files, we would add the below switches to ensure only new files are copied and are not re-copied.

-n         Do not overwrite existing files -R        Copies source files directories and any symbolic links.





 

3. Let’s start a copy. Type cp –apv SOURCE TARGET and hit return, similar to below.

Here’s an example of copying example.txt from external drive VOL to another external drive called VOL-NEW.

cp –apv /Volumes/VOL/example.txt  /Volumes/VOL-NEW

Mac terminal cp command

 

The copy will begin and you can see in real-time (we used the –v switch for verbose mode) in the Terminal window. Once the copy completes, your Terminal screen will be at normal prompt.

You can monitor the size of folder copies by Right Click -> Get Info.

Mac terminal CP command get info folder size


* Please use the comments form below to let us know if you experience issues, have questions, or can provide solution. We want and encourage feedback. *



Rate this blog entry:
3

Related Posts

 

Comments

No comments made yet. Be the first to submit a comment
Guest
Sunday, 25 June 2017

Subscribe to Become The Solution!




Search Become The Solution:

Follow Us Online!
Become The Solution Facebook PageBecome The Solution Twitter Solution ChicagoBecome The Solution Google PlusBecome The Solution InstagramBecome The Solution LinkedInBecome The Solution YouTube

Subscribe to Become The Solution!