All about programming in GNU/LINUX

Program to print the size,i-node number and Owner Id in Gnu/Linux

int main()

    struct stat *info;

    int i;
    char *path;
    path=(char *)malloc(200);
    printf(“\nEnter the path of the file whose information is to be found: “);

        printf(“\nstat failed\n\n\n\n”);

    printf(“\nSize of the file:%d Bytes”,info->st_size);
    printf(“\nOwner Id of the file:%d “,info->st_uid);
    printf(“\nGroup Id of the file owner:%d “,info->st_gid);

    printf(“\nInode NO:%d\n\n\n\n “,info->st_ino);
    return 0;


2 responses

  1. please include mailing list on your blog ;receiving posts as digest , nice posts.

    May 27, 2012 at 8:01 am

    • Thank you very much Mohammed. Ya , i’ll include mailing lists option very soon on my blog .

      May 28, 2012 at 2:52 pm

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s