Review your favorite Linux distribution.
Go Back > Forums > Non-*NIX Forums > Programming
User Name
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.


  Search this Thread
Old 01-21-2006, 07:13 AM   #1
LQ Newbie
Registered: Dec 2005
Posts: 21

Rep: Reputation: 15
removing file

when i use remove(filename) in c; it removes that file but replaces it with .nfs0209c0fb0000002e with the same contents of the last one

do you have any idea???

Last edited by sahel; 01-21-2006 at 07:31 AM.
Old 01-21-2006, 08:42 AM   #2
Registered: Jun 2005
Posts: 44

Rep: Reputation: 16
remove() should simply remove the file and not just rename it. Try this:
#include <stdio.h>


if (remove("test") < 0) {
And see if you get any output.
Old 01-21-2006, 10:14 AM   #3
Senior Member
Registered: Mar 2005
Location: USA::Pennsylvania
Distribution: Slackware
Posts: 1,065

Rep: Reputation: 45
the .nfsNN file is created when a file is accessed on the nfs and then when you delete the orgiginal file, the copy .nfsNN is left.. make sure the file is closed when you delete it.. if that does not do it, you may have to use a function specific to nfs.. remove() may not be able to do it..
Old 01-23-2006, 12:29 AM   #4
Registered: Dec 2005
Distribution: RHEL3, FC3
Posts: 383

Rep: Reputation: 30
try decrementing the file count to 0,

by unlinking it,

unlink system call


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
removing file sahel Programming 1 01-21-2006 06:15 AM
problem removing file easykillsoft Linux - General 1 11-19-2005 07:52 PM
removing the file junaid18183 Linux - Newbie 2 04-05-2005 09:55 PM
problem with removing file paulr1984 Linux - General 3 05-15-2004 02:28 PM
removing a file (--exclude is the name of the file) Santinelli Linux - General 2 01-14-2004 09:03 AM > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 10:24 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration