Hi All
I have a requirement to copy a file from one location to other and at the end the file copying is over it will update a oracle table with below details.
file_name
file_creation_time
copy_start_datetime
copy_end_datetime
rec_count
please help me writing this script
The copy command is fine.But my concern is how to get the other variables i.e source file date and time,copy start time,copy end time,size of file and word count of source file.Below is the table structure.
No_of records refer to line count of the file i.e wc -l
copy_start refers to the date and time when file copy started like 01/10/2009 11:15:25 AM
copy_start refers to the date and time when file copy process is over like 01/10/2009 11:18:25 AM
Here copy took exactly 3 minutes in the above example.
Hi dude
there is a command to know the file creation, access and modify
stat filename.txt
but you have to do some grep and cut operation to get the time.
since iam sending replay to ur post through windows otherwise iwould have sent the exact equation to... but by seeing the output of above cammand you will come to know what to do
Actually we don't have authority to change or install anything in the server.
If you can suggest some script that will do the activity it would be great.
The file creation time should be in the format MM/DD/YY HH:MI:SS AM format.
stat command is not even working in our unix box