Results 1 to 2 of 2
hi all
i would like to get filesize by programatically.
is there any way
thank you in advance...
- 04-10-2007 #1Linux Newbie
- Join Date
- Feb 2007
- Location
- hyderabad, india
- Posts
- 247
getting filesize
hi all
i would like to get filesize by programatically.
is there any way
thank you in advance
- 04-10-2007 #2Just Joined!
- Join Date
- Jan 2007
- Posts
- 23
getting file size
hi,
u can use stat or lstat ...refer to man pages...below code may help u..
void filsize(char *name)
{
struct stat buf;
if(stat(name,&buf)==-1)
printf("Can't acces filenmae %s\n",name);
printf("filesize=%ld\n",buf.st_size);
}


Reply With Quote