![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | Search | Today's Posts | Mark Forums Read |
| High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Checking for a file in file pattern before deleting it | dsrookie | UNIX for Dummies Questions & Answers | 1 | 05-09-2008 01:29 PM |
| Deleting lines inside a file without opening the file | toms | Shell Programming and Scripting | 3 | 09-24-2007 04:58 AM |
| Remove the contents of a file without deleting the file | sumesh.abraham | Shell Programming and Scripting | 10 | 12-02-2006 02:35 PM |
| Deleting a file I don't own | kumachan | UNIX for Dummies Questions & Answers | 5 | 09-19-2003 07:50 AM |
| Deleting log file | s_aamir | UNIX for Advanced & Expert Users | 5 | 01-07-2002 08:05 PM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
Zero bye file not deleting
Hi All...
The code i have written is if(filename) remove_files (filename); and my remove function is ========================================= void remove_files(char *rf) { if (remove(rf)==0) printf("(%d) Deleting %s\n",getpid(), rf); // JC 10/24/2003 else printf("(%d) Cannot delete %s\n",getpid(), rf);// JC 10/24/2003 } ========================================================= The problem is if the file to be removed is a zero byte file it is not deleting . Please let me know how can i delete the zero byte file and let me know why remove is not removing zero byte file and how can i remove it .. Thanks in advance, Arun Kumar |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Do you know the filename that the error is being thrown for? If you do, just run the command:
Code:
fuser -fu "full_path_to_filename" |
|
#3
|
|||
|
|||
|
Thanks working
|
|||
| Google The UNIX and Linux Forums |