Is it possible to change the inode of a file. What are the different conditions when the inode of a file can be changed ?


The inode is actually what identifies the file (rather than any filename, say). That's why hardlinks work in the first place.

So the only way to change the inode number is to copy the file to a new file (which then would get a new inode).

The filesystem is responsible for managing the inodes, you can't just "choose" one you like.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.