Using cpio or pax Commands to Move Contents of Directory


Environment

OS Level: AIX Version 4.1.4
Type/Model: 560

Problem

How can I move the contents of one directory to another using the cpio or pax commands?

Solution

Using the cpio command, enter the following series of commands:

   mkdir /[pathname]/[NEWDIR]
   cd /[pathname]/[OLDDIR]
   find . -print | cpio -pdl /[pathname]/[NEWDIR]

Using the pax command, enter the following series of commands:

   mkdir [NEWDIR]
   cd [OLDDIR]
   pax -pmop -rvw [OLDDIR] [NEWDIR]



[ Doc Ref: 9563490228616     Publish Date: Apr. 28, 2000     4FAX Ref: none ]