05-12-2017
Quote:
Originally Posted by
r@v!7*7@
Hi Don, Thanks for the reply.
The solution you provided is working perfectly for this scenario.
We also have a requirement where the files are placed in our directory on a daily basis.
In this case, we want the choose and process the file based on a date (placed in our directory) range. The solution you provided is not working in this case as it looking at the file creation date.
As I said before, most filesystems DO NOT STORE a file creation date for files and there is no way to determine the date on which a file was created using standard interfaces. If the last modification timestamp of a file is insufficient for you needs, you need to:
- make sure that you are storing these files on a filesystem type that keeps track of file creation dates, find an operating system specific way to look at the file's creation date for files on that filesystem, and find a way to use that operating system specific way of examining files to select the files you want to process,
- include the file creation date in the pathnames of your files and select files to process based on the date in each file's pathname, or
- put unprocessed files in a separate directory and move them to a different directory after they have been processed.
Since you haven't told us what operating system AND filesystem type you're using, we have no way to guess whether or not what you want is possible with method 1. You can use method 2 or 3 on any operating system.
This User Gave Thanks to Don Cragun For This Post:
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hi,
I have writtena script that will recursivly go into subdirecotries and report out what files there are in there that have not been accessed over various date ranges.
I do this using a number of find commands:
find . -path './.snapshot' -prune -o -type f -atime -8
find... (4 Replies)
Discussion started by: littleIdiot
4 Replies
2. Shell Programming and Scripting
Hi people,
I have 2 files, one with a list of non consecutive ranges (File1.txt), where each range begins with the value in column 1
and finishes with the value in column 2 in the same line, as can be seen above.
215312581156279 215312581166279
215312582342558 215312582357758... (4 Replies)
Discussion started by: cgkmal
4 Replies
3. Shell Programming and Scripting
Hi,
Please anyone help to achive this using perl or unix scripting .
This is date in my table 20090224,based on the date need to check the files,If file exist for that date then increment by 1 for that date and check till max date 'i.e.20090301 and push those files .
files1_20090224... (2 Replies)
Discussion started by: akil
2 Replies
4. Shell Programming and Scripting
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log |... (1 Reply)
Discussion started by: itik
1 Replies
5. Linux
Hi All,
The developers want me to search and capture the weblogic log, you know this big logs of htmls.
They want to me to have ranges on the date and time. Like
from "2010-01-20 14:04:46,186" to "2010-01-20 15:00:12,490"
I can only do this,
cat /usr/local/bea/logs_prod1/debug.log... (1 Reply)
Discussion started by: itik
1 Replies
6. Shell Programming and Scripting
hi !
how can i get files in a directory between certain date ranges ?
say all files created/modified between Jan24 - Jan31
thanks (10 Replies)
Discussion started by: aliyesami
10 Replies
7. Shell Programming and Scripting
I have been struggling with a script to automate some security related activities. I have it pretty much working, all except the search. I have an input file formatted as such:
216.234.246.158 216.234.246.158 ``
24.249.221.22 24.249.221.200 ``
24.249.226.0 ... (4 Replies)
Discussion started by: tsunami4u
4 Replies
8. Shell Programming and Scripting
Hi,
i want to make script. In a directory everyday( exclude sat and sun) in between 10 pm to 1 am there are 2 files comes and when file comes it will mail us. Format for files is mentioned below.
please help me on making this, and also have year end consider and if files come after 12 am it... (6 Replies)
Discussion started by: pallvi_mahajan
6 Replies
9. Programming
Hi Guys,
I am having below tables used in oracle
bal
ID BALANCE BAL_DATE
1 -11.71 01-JAN-05 00.00.00
1 -405.71 02-JAN-05 00.00.00
1 -760.71 03-JAN-05 00.00.00
ref_table
PRODUCT EFF_FROM_DATE EFF_TO_DATE TYPE MIN_AMT MAX_AMT CHARGE
12 01-JAN-05 00.00.00 01-JAN-06... (6 Replies)
Discussion started by: rohit_shinez
6 Replies
10. Shell Programming and Scripting
Hi There, Good Day !!
I have txt file containing data in the below format. There are many lines, here i have mentioned for example.
cat remo.txt
2/3/2017 file1
3/4/2016 file2
6/6/2015 file5
1/1/2018 file3
4/3/2014 file4
-
-
-
I need to grep the file names for given date rage... (11 Replies)
Discussion started by: kumar85shiv
11 Replies
LEARN ABOUT NETBSD
mount_filecore
MOUNT_FILECORE(8) BSD System Manager's Manual MOUNT_FILECORE(8)
NAME
mount_filecore -- mount a FILECORE file system
SYNOPSIS
mount_filecore [-afnR] [-g gid] [-o options] [-u uid] special node
ORIGIN
The NetBSD FILECORE filesystem is a read only implementation of the filecore file system found in Acorn Computers RISC OS operating system.
This operating system is the ROM based operating system found on their ARM 6, ARM7 and StrongARM 110 based RiscPC machines that are supported
by the arm32 port. Under RISC OS, filecore will have multiple instantiations for file systems on different block devices such as floppies,
IDE discs, SCSI discs etc. and these frequently are considered to be different filesystems e.g. ADFS, IDEFS, SCSIFS etc.
DESCRIPTION
The mount_filecore command attaches the FILECORE filesystem residing on the device special to the global filesystem namespace at the location
indicated by node. Both special and node are converted to absolute paths before use. This command is normally executed by mount(8) at boot
time, but can be used by any user to mount a FILECORE file system on any directory that they own (provided, of course, that they have appro-
priate access to the device that contains the file system).
The options are as follows:
-a Give all files world access.
-f Append the filetype to each filename. This option currently has no effect.
-g gid Set the group of the files in the file system to gid. The default group is the group of the directory on which the file system is
being mounted.
-n Give all files owner access.
-o options
Use the specified mount options, as described in mount(8).
-R Give all files owner read access.
-u uid Set the owner of the files in the file system to uid. The default owner is the owner of the directory on which the file system is
being mounted.
SEE ALSO
mount(2), unmount(2), fstab(5), mount(8)
HISTORY
The mount_filecore utility first appeared in NetBSD 1.4.
CAVEATS
The 'filecore' filesystem currently supports the Acorn filecore file system found on Acorn Computers RiscPC desktop machines with versions of
RISC OS up to 3.70.
BSD
June 25, 2004 BSD