1832857 Members
3220 Online
110048 Solutions
New Discussion

Re: directory disappears

 
Gary_O
Frequent Advisor

directory disappears

Have had an atjob working fine for years. Since end of March, the job seems to run (see it in cron log), yet in the morning, the output, and the directory that holds it are not there.

Saw this happen. Scheduled report. Saw the directory and output. Went back (with in a few minutes), and both the output and its directory were GONE. I was the only one on the machine.
7 REPLIES 7
Naveej.K.A
Honored Contributor

Re: directory disappears

something like this in your script??

cd /directory1/
cd dir2
cd dir3
rm -rf *

and the one amond dir3 doesn't exist and dir3 gets removed???

regds
Naveej
practice makes a man perfect!!!
nibble
Super Advisor

Re: directory disappears

mind to display the script in your at? there might be a command that deleted em automatically
Jeroen Peereboom
Honored Contributor

Re: directory disappears

Any other job scheduled a few minutes later?

JP
Michael Schulte zur Sur
Honored Contributor

Re: directory disappears

Hi,

at job? Do you manually create it all the times or are you talking about a crontab job?
Could you post the script as attachment?

greetings,

Michael
Sanjiv Sharma_1
Honored Contributor

Re: directory disappears

Hi Ling,

Post your script if possible.

It may help in understanding what caused the removal of the directories.

The command which might has removed is "rm -rf .
Check for this in the script or some other script which might have executed during that time.
Everything is possible
Bruno Ganino
Honored Contributor

Re: directory disappears

Ling, Hi to you.
If you have script for purge files or directory automatically.
Check rm or mv commands.
Bruno
Torino (Turin) +2H
Mark Greene_1
Honored Contributor

Re: directory disappears

If you have auditing on your system active, set it to track file and directory deletion and then watch the logs. Alternatively you can get lsof

http://hpux.cs.utah.edu/hppd/hpux/Sysadmin/lsof-4.70

and run it in the background starting just prior to when the job in question runs and then let it go 5-10 minutes, routing the output to a file.

Either method should point you to the process removing the file and directory.

mark
the future will be a lot like now, only later