stat() fails!!! what can i do?


 
Thread Tools Search this Thread
Top Forums Programming stat() fails!!! what can i do?
# 1  
Old 09-29-2001
Question stat() fails!!! what can i do?

Hi all,

I can not understand why my stat() function fails all the time when function tries to go recursevly. Someone suggested that it might be poiter problem. Please, look up my code at: www.donnelly.cc.ks.us/readdir_test.c. How can i solve this problem? Any suggestion are welcome!

Thank you all
# 2  
Old 10-01-2001
Check that link. It doesn't work for me.
# 3  
Old 10-01-2001
Never mind

Well it does for me though Smilie

Never mind i fixed the problem,
Thank you all
# 4  
Old 02-06-2002
Hello Solvman,

I have written a C program making system call to stat(). If you don't mind, i'd like to compare my code with yours. Do you still have the link to the code?

Thanks,

Rachael
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Please Help CP CANNOT STAT issue

Hi All, I am getting the below error can anyone please help with this? cp ${AI_SERIAL}/file_name ${AI_SERIAL_ARCH}/${ODATE}_file_name cp: cannot stat `$AI_SERIAL/FILE_NAME': No such file or directory + gzip:$AI_SERIAL_ARCH./$ODATE_FILE_NAME gzip:$AI_SERIAL_ARCH./$ODATE_FILE_NAME: No such... (2 Replies)
Discussion started by: bhanudhingra
2 Replies

2. Shell Programming and Scripting

Stat value changes

Die to what all operations, the "Modify" and "Change" values of stat output changes for a file. I found, during editing a file, Change and Modify alters. When chmod'ing Change alters, while Modify doesnot alters. Is there more situations where these changes? (1 Reply)
Discussion started by: anil510
1 Replies

3. UNIX for Dummies Questions & Answers

Stat command

i know this command does not exist in solaris. however, i read somewhere on this forum that basically everything the stat command provides in other oses can be obtained in solaris using the ls command. i've searched the forum for a while now and i cant find the thread. does anyone know about... (1 Reply)
Discussion started by: SkySmart
1 Replies

4. UNIX for Dummies Questions & Answers

stat output

hi guys i got confused about stat output stat manual says File : Size in Bytes Blocks : Number of blocks used IO Block : Size in bytes of every block. when i use stat command for passwd file it says ~#stat /etc/passwd File: `/etc/passwd' Size: 999 Blocks: 8 IO... (4 Replies)
Discussion started by: mhs
4 Replies

5. Shell Programming and Scripting

cannot stat error

I'm trying to find .tif files in a directory tree and rename them prior to zipping them and moving them to another dir. this is my code: cd $TMPPATH pwd ctr=0 for i in 'find . -name "*.tif"' do let "ctr+=1" newtifname=$DATEDIR"_"$SEQ"_"$ctr".tif" mv "$i"... (6 Replies)
Discussion started by: rss0213
6 Replies

6. Solaris

stat: Available on Solaris?

JoeyG's note in the following thread got me thinking about using stat more often in file operations. I've only ever used it within perl - didn't even realize there was a commandline version of it.... (3 Replies)
Discussion started by: Smiling Dragon
3 Replies

7. UNIX for Advanced & Expert Users

stat fails HP unix

Hi all, I have scenario here , In my C program i check the stat for a file as stat(fname, &stat_buf); If it is succesfull, i will process else i will make my program to fail. The file which i am checking has no stat information. What might be the reason, file has no stat... (8 Replies)
Discussion started by: arunkumar_mca
8 Replies

8. Programming

Q with stat()

From reading various articles on the net, I know stat() is used on files to get things like permissions, sizes etc... As a folder is a special type of file in Unix, I assumed that stat() could work on it as well as any general file. However, from running my program, perror() reported that the... (3 Replies)
Discussion started by: JamesGoh
3 Replies

9. UNIX for Advanced & Expert Users

stat

the output of stat command is Size: 238 Blocks: 8 IO Block: 4096 regular file Device: 80ah/2058d Inode: 736783 Links: 1 Access: (0664/-rw-rw-r--) Uid: ( 500/ gajju) Gid: ( 500/ gajju) Access: 2008-09-08 20:00:15.000000000 +0530 Modify: 2008-09-08... (6 Replies)
Discussion started by: gajju
6 Replies

10. UNIX for Dummies Questions & Answers

Cannot stat?

Hi! I ran into a problem with a job I'm running. All it is doing is a "touch" on a filename. However, when I ran the job, it error'd out and got the message 'cannot stat'. When I restarted the job (making no changes) it worked just fine. Anyone know what this means? (1 Reply)
Discussion started by: lgardner
1 Replies
Login or Register to Ask a Question