10-09-2009
How to get the files lists
Hi All,
Need the help in getting the file list which are generated for the time period.
example if i want to get the list of file generated between 11 to 12 clock.
i used the find command search the files with -cmin flag with -60.
find /home/test/* -cmin -60 -type f -exec ls {} \;
that will lists the files which are created within the 60 minutes since the command run.
if i run the command at 12:15 it will lists the files generated between 11:15 to 12:15
Pl give some suggestion me to how to get the files generated between 11:00 to 12:00
Thanks in advance..
Madhu
Last edited by nmadhuhb; 10-09-2009 at 04:08 AM..
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
If I had a list of numbers in two different files, what would be the fastest and easiest way to find out which numbers in list B are not in list A without reading each number in list B one at a time and using grep thousands of times against list A?
I have two very long lists of numbers and the... (4 Replies)
Discussion started by: keelba
4 Replies
2. Shell Programming and Scripting
Hi, I need a script that will:
1. Go through about 20 different folders, each containing about 20 1d files. The 1d files go something like this:
22.253 37.707 78.117 112.374 127.944 156.067 180.956 233.785 249.256 ... (1 Reply)
Discussion started by: ac130pilot
1 Replies
3. Shell Programming and Scripting
File_A contains Strings:
a
b
c
d
File_B contains Strings:
a
c
z
Need to have script written in either sh or ksh. Derive resultant files (File_New_A and File_New_B) from lists File_A and File_B where string elements in File_New_A and File_New_B are listed below.
Resultant... (7 Replies)
Discussion started by: mlv_99
7 Replies
4. Shell Programming and Scripting
I am dealing will many thousand fairy small files.
I need to search them for various matches and depending on what I find, may need to search some files again for additional matches.
Generally speaking, is it better to write a txt file to an @array/@list and then work with it (multiple... (1 Reply)
Discussion started by: OldGaf
1 Replies
5. Shell Programming and Scripting
Hello, I'm trying to write a script which is listing files based on different preferences, like filetype or permissions. All is fine, except for one: I want to list files in /home which has a different owner than the home directory it is in.
Here is an example:
/home/UserA is the directory, and... (10 Replies)
Discussion started by: Zwiebi
10 Replies
6. Shell Programming and Scripting
I have two files A and B listing ip addresses
and all the ip addresses in B are in A, and A includes other ip addresses
now I want to get the list of the ip addresses that are in A but not in B
how to achieve this? thanks (1 Reply)
Discussion started by: esolvepolito
1 Replies
7. Shell Programming and Scripting
Looking for a little help here.
I have 1000's of text files within a multiple folders.
YYYY/
/MM
/1000's Files
Eg.
2014/01/1000 files
2014/02/1237 files
2014/03/1400 files
There are folders for each year and each month, and within each monthly folder there are... (4 Replies)
Discussion started by: whegra
4 Replies
8. Shell Programming and Scripting
I want to compare 4 edge-lists to basically see if an edge is present in all 4 networks. The issue is that an edge A-B in one file can be present as B-A in another file.
Example:
Input 1: net1.txt
A B 0.1
C D 0.65
D E 0.9
E A 0.7
Input 2: net2.txt
A Z 0.1
C D 0.65
E D 0.9
E A... (1 Reply)
Discussion started by: Sanchari
1 Replies
9. Shell Programming and Scripting
I have this while loop, that works but is quite slow to process though. I'm hopping there might be a faster/better way to find what I'm looking for.
I have 2 lists of numbers, and want to only find files where a file name has both values present.
each list has about 100 values.
while... (10 Replies)
Discussion started by: whegra
10 Replies
10. Shell Programming and Scripting
I have a tar arcive
arch_all.tar.gz
and 4 batched tar archive . These batches are supposed to have all the files form arch1.all.tar.gz
arch1_batch1.tar.gz
arch1_batch2.tar.gz
arch1_batch3.tar.gz
arch1_batch4.tar.gz
my issue is that the directory structure in "arch_all.tar.gz" is... (6 Replies)
Discussion started by: sumang24
6 Replies
LEARN ABOUT OSF1
defragcron
defragcron(8) System Manager's Manual defragcron(8)
NAME
defragcron - Schedules AdvFS file domains for defragmenting
SYNOPSIS
/usr/sbin/defragcron [-p] [-q] [-t nnn] [-b hh:mm] [-a hh:mm] [-l pathname] [domain...]
/usr/sbin/defragcron [-p] [-q] [-t nnn] [-T mm] [-l pathname] [domain...]
OPTIONS
Specifies that the domains are to be defragmented in parallel. If not specified, the default is to serially defragment the domains. Sup-
press informational messages. If not specified, the default is to produce informational messages. Specifies the aggregate I/O performance
threshold, the point at which the domain should be defragmented. A number from 1-100. If not specified, the default is to always defrag-
ment the domain.
The performance threshold is based on the value returned by the defragment -nv command. If this value is lower than or equal to the
value specified here, the domain is defragmented. If specified, the utility will not run before this time and will return an error
if the time is not yet reached. Specify time values using the 24-hour clock. If not specified, the default time is 01:00. If
specified, the utility will not run after this time, and will return an error if the time has been passed. Specify time values
using the 24-hour clock. If not specified, the default time is 05:00. Specifies an exact time interval, in minutes, for the
defragment utility to run. If not specified, there is no default.
If you use this option, its action overrides the before and after time checking of the -a and -b options. Specify the -l option to
direct messages to log files in the specified directory. One log file is generated for nonspecific messages and separate log files
are generated for each domain that is defragmented.
If the option is not specified, the default action is to not produce log files for the messages (which then are directed to the
standard output device).
If the option is specified, you also must specify a pathname for the directory into which the log files are to be written. The
default directory, as specified in the root crontab entry, is /usr/var/defragcron/.
The names of the log files have the following format: domain1.log, domain2.log, ..., and so on, one file for each active domain,
plus a file, defragcron.log for the nonspecific messages. If you have named a domain defragcron, messages for that domain are writ-
ten to the nonspecific messages in the defragcron.log file.
OPERANDS
Specifies one or more AdvFS file domains. If no domains are specified, the default action is for the utility to defragment all active
AdvFS file domains.
DESCRIPTION
The defragcron utility runs the defragment utility to a schedule that you specify on all active AdvFS file domains or on the active domains
you specify.
The typical use of this utility is to run it as a command in the cron daemon. See cron(8).
Unless the domain is listed in the comand line, the utility does not attempt to defragment inactive file domains (those which have no
mounted filesets). It can try to defragment file domains that have some mounted and some unmounted filesets. In this case, the utility
fails.
RESTRICTIONS
You must have root user privileges to run this utility.
All restrictions for the defragment utility are in effect for the defragcron utility.
EXIT STATUS
The utility returns a 0 (zero) on success. Otherwise, it returns a 1 and an error diagnostic.
EXAMPLES
The following example defragments all active domains that have an aggregate I/O performance threshold less than or equal to 60 for an
interval of 240 minutes: # /usr/sbin/defragcon -q -t 60 -T 240
FILES
The command's path. The path of the defragment utility.
SEE ALSO
Commands: crontab(1), cron(8), defragment(8)
defragcron(8)