cancel
Showing results for 
Search instead for 
Did you mean: 

File delete (erase)

Shin Dong Ki
Occasional Contributor

File delete (erase)

Hi all,

A file deleted after I create a file in a specific directory automatically.
I don't know why this case happend.

Could you let me know for this happenning?

Thanks for your comment and advice.
5 REPLIES
Dennis Handly
Acclaimed Contributor

Re: File delete (erase)

Files don't get deleted unless someone or a script did it.
I assume this isn't /tmp or /var/tmp?
Venkatesh BL
Honored Contributor

Re: File delete (erase)

Tell exactly (giving actual commands) of what happened. Then, we may be able to help you out.

There is no magical deletion reported on HP UX till now! :)

So, either someone/script deleted it behind your back. Or you mounted another file system on that directory, which makes the existing files before mount 'invisible', not 'deleted'.
Suraj K Sankari
Honored Contributor

Re: File delete (erase)

Hi,

Please check your crontab job with
#crontab -l

or may any scheduler job is running.

some script will be there behind this check every job which is running in cron.

Suraj
Analyst
Trusted Contributor

Re: File delete (erase)

Hi Shin ,

As the previous writers said .

Automatic deletion can happen only , by script/ scheduler.

If the system is trusted/ auditing is enabled.

From the logs you can find out the deletion , where/ how/ who has done it.

Thanks,
Analyst.
Frank de Vries
Respected Contributor

Re: File delete (erase)

Apart from scripts and jobs
there are the Classic unix user 'misunderstandings'

I just name 3, but there are many others

1) trying to delete a .profile with rm .*
which will delete a lot more

2) Trying to cat or sed and output to same name cat file > file or sed < file > file

3) mv file /farawayddir/foobaar

etc etc

Just restore the file from your backup,
also ensure that your owner and privileges
are what you expect. (don't user chmod 777 for instance )
Look before you leap