Sponsored Content
Top Forums UNIX for Advanced & Expert Users How to access inode information Post 302280743 by jim mcnamara on Tuesday 27th of January 2009 01:37:30 PM
Old 01-27-2009
Oh. You probably want to look into opendir(), readdir(), -- look at dirent.h also.
This gives you the inode number. stat() gives you what find uses to select files.
See /usr/include/sys/stat.h
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

file access inode update

When is a file "accessed" according to UNIX? For example: gzipping a file will not change the access time. (1 Reply)
Discussion started by: dangral
1 Replies

2. Shell Programming and Scripting

INode

hi i am nitin... jus a new kid on the block... my query is... does the concept of region invovle sharin of inodes wen the sticky it is set... eg... if two process share two text regions... wat actually happens thank u (1 Reply)
Discussion started by: nitinsharma_ssn
1 Replies

3. Filesystems, Disks and Memory

Inode number

as kernel keeps track of user activities on a file by its INODE number and I node table . what is the structure of Inode table. and where does this Inode table mapped into?user space or kernel space? is the Inode Number is fixed for a file till its deletion? thanks (1 Reply)
Discussion started by: compbug
1 Replies

4. Red Hat

inode no and fd path

hi, can anyone please tell me where i can extract inode numbers and path associated with all file descriptors. i want these informations only. is there any system call or functions to get these things? i hav a RHEL 4. also /proc/pid/fd shows some file descriptor list. is that the proper path to... (1 Reply)
Discussion started by: sanjaykhuntia
1 Replies

5. Solaris

about inode

how can i see inode table information of a perticler inode.anybody knows pls tell me. Than.Q (3 Replies)
Discussion started by: nag.mi2000
3 Replies

6. AIX

FS inode 58%

Hi Guys, I have this filesystem got big with inode: /dev/hd4 3670016 183664 95% 63705 58% /var I don't know why the system doesn't give alerts on this FS although it's 95% and why the inode is 58%. Any comments will be highly appreciated. Thanks, itik (1 Reply)
Discussion started by: itik
1 Replies

7. Programming

C++ application: how to access AIX process and cpu information?

Hi, may be this is an AIX noob question: my current C++ application runs on Linux and is quite memory consuming. Therefore, the application writes a logfile after it has finished containing memory information, CPU information, information on the running other processes besides my application... (0 Replies)
Discussion started by: DarthVader77
0 Replies

8. UNIX for Dummies Questions & Answers

inode filename

can someone please tell me why is the filename not inlcuded in the inode of the file? (2 Replies)
Discussion started by: wowman
2 Replies

9. Solaris

inode in solaris

Dear, How can i check inode information in my Solaris box? With Regards, Mjoshi (4 Replies)
Discussion started by: mjoshi87
4 Replies

10. UNIX for Dummies Questions & Answers

How do you find max filesize with inode information ?

How do you find the maximum file size with the following information -: A unix filesystem has 1024 bytes block size with 32-bit address. The i-node has 12 direct and 1 indirect, 1 double indirect, and 1 triple indirect addresses. What is the maximum file size it can access ? What is the... (1 Reply)
Discussion started by: sreyan32
1 Replies
READDIR(3)						     Linux Programmer's Manual							READDIR(3)

NAME
readdir - read a directory SYNOPSIS
#include <sys/types.h> #include <dirent.h> struct dirent *readdir(DIR *dir); DESCRIPTION
The readdir() function returns a pointer to a dirent structure representing the next directory entry in the directory stream pointed to by dir. It returns NULL on reaching the end-of-file or if an error occurred. According to POSIX, the dirent structure contains a field char d_name[] of unspecified size, with at most NAME_MAX characters preceding the terminating null character. Use of other fields will harm the portability of your programs. POSIX-2001 also documents the field ino_t d_ino as an XSI extension. The data returned by readdir() may be overwritten by subsequent calls to readdir() for the same directory stream. RETURN VALUE
The readdir() function returns a pointer to a dirent structure, or NULL if an error occurs or end-of-file is reached. ERRORS
EBADF Invalid directory stream descriptor dir. CONFORMING TO
SVID 3, POSIX, BSD 4.3 SEE ALSO
read(2), closedir(3), dirfd(3), opendir(3), rewinddir(3), scandir(3), seekdir(3), telldir(3) 1996-04-22 READDIR(3)
All times are GMT -4. The time now is 04:07 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy