Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

(-A "file"....  command

Posted on 1998-10-07
1
Medium Priority
?
208 Views
Last Modified: 2010-03-05
With the following routine sometimes it pushes files
even if they are older than 10 minutes..

if ((-A "$file_dir/$file" < 600 / 86400) && ($file !~ /^data/) && ($file ne "lock") && ($file ne "vis") && ($file ne "vis1") && ($file ne "vis2") && ($file ne "vis3") && ($file ne "vis4")) {
push (@cleanfilelist,$file);



Is there another command as (-A "$file_dir/$file" < 600 / 86400) to
select only files not older than 10 minutes?
0
Comment
Question by:Bigi
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 5

Accepted Solution

by:
b2pi earned 400 total points
ID: 1205180
You don't say what OS you're using, but try using -M rather than -A
There's often a difference on unix boxes. To see this, execute the
following code:

opendir(A, ".");
@files = readdir(A);
closedir(A);
foreach (@files) {
        next if m/^\./;
        $A = -A $_;
        $M = -M _;
        next if $A == $M;
        print "$A\t$M\t$_\n";
}
 

0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Explain concepts important to validation of email addresses with regular expressions. Applies to most languages/tools that uses regular expressions. Consider email address RFCs: Look at HTML5 form input element (with type=email) regex pattern: T…
Six Sigma Control Plans

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question