Solved

(-A "file"....  command

Posted on 1998-10-07
1
202 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 100 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

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

I have been pestered over the years to produce and distribute regular data extracts, and often the request have explicitly requested the data be emailed as an Excel attachement; specifically Excel, as it appears: CSV files confuse (no Red or Green h…
There are many situations when we need to display the data in sorted order. For example: Student details by name or by rank or by total marks etc. If you are working on data driven based projects then you will use sorting techniques very frequently.…
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

617 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