Results 1 to 6 of 6
when i am working with a file that opened file also deleting when some one deleting that file .How to prevent a file not to be deleted when it is ...
- 03-17-2010 #1Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
file deletion problem
when i am working with a file that opened file also deleting when some one deleting that file .How to prevent a file not to be deleted when it is in read or write mode opened .Please give me the reply.............
Thank You.
- 03-17-2010 #2
I can't understand you requirement. Normally a opened file ,if deleted , will remain available as long as they not closed.
For example,
open mp3 file and play in music player. After few seconds delete the file from it's original location.
Though file is deleted , since it was opened my music player application , you will continue to hear the song. Once the song is completed and if you play the next song previous file is closed ,hence lost.
Please understand , no one here get paid to answer your questions.
http://www.linuxforums.org/forum/lin...ums-rules.html- Lakshmipathi.G
-------------------
FOSS India Award winning ext3fs Undelete tool and tutorials www.giis.co.in
First they criticize you,Then they laugh at you,Then they fight with you,Then you win. - M.K.Gandhi
-------------------
- 03-17-2010 #3Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
i am trying to develop a program which reads data from one file and write that to another file . In the middle also the opened file is deleting when we delete.But it is not happen in windows os .I want that same thing that is the file not to be delete when it in use.Please give the rly......Thank you
- 03-17-2010 #4New to the internet, technical forums, or the hacker / open source community??
Read this to learn good posting habits http://www.catb.org/~esr/faqs/smart-questions.html
RHCE for RHEL version 5
RHCT for RHEL version 4
- 03-17-2010 #5Just Joined!
- Join Date
- Mar 2010
- Posts
- 3
thatnks for u rly ,if u have any idea please tell to me how to write that program or how to handle .
- 03-17-2010 #6
There are several ways to synchronize a cp, that is followed by an rm
Easiest would be to to it in a script:
cp <FILE> /some/where/ && rm <FILE>
The rm part after && will only be executed, if the cp returned an errorstatus 0.
Or you could use rsync.
It has an option to delete the source file after succesfull sync.
One could also think of lock files or more sophisticated methods.
But actually, I am not 100% sure, what you want to achieve.You must always face the curtain with a bow.


Reply With Quote
