Copying by Inode
Dan Martin
dc.martin
Wed Nov 1 08:47:01 PST 2006
Ben Duncan wrote:
> I need to move / copy files from a smaller hard drive to a
> larger one. However, some of the commercial programs I have
> rely on copy protection by INODE registration. I was
> wondering if anyone know of a way to copy / move files from
> a smaller partition to a the larger one while keeping to same
> inode numbers. This will be to a fresh disk on the receiving
> side of things ...
>
> Thanks ...
>
Ben,
The only thing I can think of off the top of my head is to use
the -inum option to find. If the inode you need is found, cp
whatever is there so you don't lose it. Then cp your appl file
to the name that find says is occupying the desired inode.
Then mv that to the name your application expects.
Lastly, rename the original file found back to whatever its name is
supposed to be.
Not sure what to do if the required inode is not currently occupied.
Maybe a script that loops and "touch"es new files, with a 1-up number
for the name, then does a stat $file to report and test on the inode.
But there's gotta be a slicker way than this.
Good luck,
Dan Martin
More information about the Linux-users
mailing list