airborne
asked on
moving files
I have two filesystems that are similar in hierarchy only named differently. The structure looks as follows:
/mount1/big/[A-Z]/[A-Z]/[A -Z]/unique name.big
/mount1/med/[A-Z]/[A-Z]/[A -Z]/unique name.med
/mount1/sml/[A-Z]/[A-Z]/[A -Z]/unique name.sml
/mount2/big/[A-Z]/[A-Z]/[A -Z]/unique name.big
/mount2/med/[A-Z]/[A-Z]/[A -Z]/unique name.med
/mount2/sml/[A-Z]/[A-Z]/[A -Z]/unique name.sml
The unique name in an 8.3 format where the last 3 of the eight is the last three letters of the hierarchy.
ie.
/mount1/big/F/G/W/AAABGFGW .big
---
My only point here is that the files are absolutely unique.
I want to move all of the files from /mount2 to mount1 and maintain both the timestamp of the file, hence the move vs copy, and also have them land in the correct directory if it exists, and create the directory if it doesn't exist. When I tried a mv command, for those directories that existed, the system simply went down another level until it didn't find a directory with that name and began creating them at that level. This is not what I want. I simply want to move the files and directories to the filesystem and maintain only three levels of ALPHA character directories under the BIG MED and SML directory.
I hope that this is enough info, if not, ask away.
Thanx in advance
Angel
/mount1/big/[A-Z]/[A-Z]/[A
/mount1/med/[A-Z]/[A-Z]/[A
/mount1/sml/[A-Z]/[A-Z]/[A
/mount2/big/[A-Z]/[A-Z]/[A
/mount2/med/[A-Z]/[A-Z]/[A
/mount2/sml/[A-Z]/[A-Z]/[A
The unique name in an 8.3 format where the last 3 of the eight is the last three letters of the hierarchy.
ie.
/mount1/big/F/G/W/AAABGFGW
---
My only point here is that the files are absolutely unique.
I want to move all of the files from /mount2 to mount1 and maintain both the timestamp of the file, hence the move vs copy, and also have them land in the correct directory if it exists, and create the directory if it doesn't exist. When I tried a mv command, for those directories that existed, the system simply went down another level until it didn't find a directory with that name and began creating them at that level. This is not what I want. I simply want to move the files and directories to the filesystem and maintain only three levels of ALPHA character directories under the BIG MED and SML directory.
I hope that this is enough info, if not, ask away.
Thanx in advance
Angel
Hi...
# ufsdump 0ufc /dev/rmt/1lbn /mount2
# umount /mount2
# mv /mount1 /mount2
# cd /
# ufsrestore rvf /dev/rmt/1lbn .
# mv /mount2 /mount1
Specify next volume #: 1
set owner mode [yn] n
#rm restoresymtable
This is for Solaris, you do not say which OS you use
As for the timestamp, dunno.
regards
# ufsdump 0ufc /dev/rmt/1lbn /mount2
# umount /mount2
# mv /mount1 /mount2
# cd /
# ufsrestore rvf /dev/rmt/1lbn .
# mv /mount2 /mount1
Specify next volume #: 1
set owner mode [yn] n
#rm restoresymtable
This is for Solaris, you do not say which OS you use
As for the timestamp, dunno.
regards
Woops...
Do line 6 last of all
rickyr
Do line 6 last of all
rickyr
ASKER
I am running AIX 4.2.1.
I currently have data on both /mount1 and /mount2. so I don't want to unmount one to get to the other. We just upgraded our OS and can now have filesystems that exceed 2Gig in size. I have a complete 32Gig raid broken into 2Gig chunks and I want to consolidate them. This is the reason for the question.
I currently have data on both /mount1 and /mount2. so I don't want to unmount one to get to the other. We just upgraded our OS and can now have filesystems that exceed 2Gig in size. I have a complete 32Gig raid broken into 2Gig chunks and I want to consolidate them. This is the reason for the question.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
You are the Man! Have my Bud Light!
Thanx a bunch
A
Thanx a bunch
A
ASKER