Home » Infrastructure » Linux » Tracking os files in a directory
Tracking os files in a directory [message #254888] Mon, 30 July 2007 00:12 Go to next message
gln.sarma
Messages: 11
Registered: April 2004
Location: hyderabad`
Junior Member

Oracle :10.2.03
os : Linux

My requirement is like this. We have an application generated thru php/jvava all the files are stored in /httpd folder. We have sub folders under this like

/httpd
/101/
a.php
b.php
:
:
/102/
102a.php
102b.php
:
:
/103/
c.php
d.php

aa.php
bb.php
cc.php

I populated these file entries in a table DIRTRACK

consists of ftype : stores extenestion of file
rpath : Directory path
fname : Finame

I created all the entries presently and application is up with this.

How can I automate the entries. In case of any new file generated or copied by the application team. Instead of entering is it possible to automate thru a schedule or job to put the entry in the table instead of entry.

What is the best mechanism to Automate this process.

I hope I have explained the problem.

Re: Tracking os files in a directory [message #254891 is a reply to message #254888] Mon, 30 July 2007 00:15 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>I hope I have explained the problem.
Yes, but what does your problem have to do with Oracle RDBMS???
This is an ORACLE forum.
Re: Tracking os files in a directory [message #254894 is a reply to message #254891] Mon, 30 July 2007 00:19 Go to previous messageGo to next message
gln.sarma
Messages: 11
Registered: April 2004
Location: hyderabad`
Junior Member


I want to create job schedular which will run every minute to track the new file generated in the directory and it will insert to the table.

I think I have asked an oracle question only.

Will plsql can solve this problem ?


Re: Tracking os files in a directory [message #254895 is a reply to message #254888] Mon, 30 July 2007 00:24 Go to previous messageGo to next message
BlackSwan
Messages: 26766
Registered: January 2009
Location: SoCal
Senior Member
>Will plsql can solve this problem ?
NO.
PL/SQL has no way to know/see what files exists or not.

Why does not the task creating the new files put the new filenames in a file where PL/SQL could "find" them?
Re: Tracking os files in a directory [message #254897 is a reply to message #254895] Mon, 30 July 2007 00:32 Go to previous messageGo to next message
gln.sarma
Messages: 11
Registered: April 2004
Location: hyderabad`
Junior Member


I was under an impression, PLSQL can solve by using its native packages like UTL_FILE etc...

I was informed PLSQL is so powerfull, it is also possible thru plsql where we can automate this kind of jobs.

Thanks for informing that it is not possible thru PLSQL by using your good knowledge

You have ansered many questions. I should accept your thoughts. In case if you come across similar query and solution pl. let me know.

I am a junior member. I felt that this will solve my problem. Thanks once again.
Re: Tracking os files in a directory [message #254908 is a reply to message #254897] Mon, 30 July 2007 01:12 Go to previous message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Why not using a shell script and crontab?

Regards
Michel
Previous Topic: OCFS2 - Kernel Panic
Next Topic: Oracle installation on Linix
Goto Forum:
  


Current Time: Fri Apr 19 04:17:54 CDT 2024