Linux Tip of the Day – Moving files with cpio

November 26, 2007 by Adrian  
Filed under Apple

If you have a multitude of files to move from onedirectory or filesystem to another, here’s a one liner:

 

# find /old_directory -depth | cpio -pdmv /new_directory

 

This will move all of the files under the specified old_directory to the new_directory, keeping the same ownership, permissions, and directory structure.

Speak Your Mind

Tell us what you're thinking...
and oh, if you want a pic to show with your comment, go get a gravatar!