We help IT Professionals succeed at work.

how do I get the inode number of a File?

oleber
oleber asked
on
2,703 Views
Last Modified: 2012-08-13
I need to identify univocally a file in any SO and I was considering to use the inode number.

So how do I get the inode number of a File?
Comment
Watch Question

This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
I know what is the inode. But I don't know how to get it in java.
CERTIFIED EXPERT
Top Expert 2016
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
softlink links can get a problem.
CERTIFIED EXPERT
Top Expert 2016

Commented:
Then Runtime.exec ls -i

Author

Commented:
windows also have inode, but don't have ls
CERTIFIED EXPERT
Top Expert 2016

Commented:
But they don't have symlinks (apart from very specialized cases)
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
There is really no correct solution presented in here.

This question shall be deleted or the points should be splited between all them.
CERTIFIED EXPERT
Top Expert 2016

Commented:
I answered the question quite specifically
I object too: the answers by CEHJ, rama_krishna580 (and me) were correct, but disappointing.

;JOOP!
CERTIFIED EXPERT
Distinguished Expert 2019

Commented:
I believe that this question is answered too. The only problem is that it's only a 50 points question so I had to leave the last answer (sciuriware's) out of the split.

OK

Author

Commented:
If the problem is the points, I give them
CERTIFIED EXPERT
Top Expert 2016

Commented:
:-)

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.