LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-09-2008, 01:40 AM   #1
rohanak
Member
 
Registered: Aug 2007
Posts: 38

Rep: Reputation: 15
opening a file using its inode number...


Hello,
I need to open,read,write files using their inode numbers/device numbers as a part of my project.Does any API exist.the 'find' command does a recursive search.I want a method of opening files in just 1 access.I have the filename but need to open it using inode number.How do I do it?
 
Old 03-09-2008, 06:27 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
maybe this

if you know the filename.....

su
stat /path/file response includes inode number.

But the inode does not contain the file contents itself.

see para 3 http://tldp.org/HOWTO/From-PowerUp-T...t-HOWTO-7.html
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting file name from inode number kalamaraki Programming 10 11-20-2018 03:57 PM
opening a file using its inode number rohanak Linux - General 2 03-09-2008 06:25 AM
accessing file using inode number namusin Linux - Kernel 1 01-30-2007 06:31 PM
access file using inode number? allasso Linux - General 1 09-26-2006 09:14 PM
What can change an inode number? nc101 Linux - General 2 01-03-2005 10:29 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 02:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration