Hi, Bothered to a code for you check this out. #!/usr/bin/perl use integer; #Keep a default setting to start off with $str=100; $sfile=""; foreach $i (`ls`) { chop($i); if(-f $i) { # change this for including directories also if (-A $i < $str) { $str = -A $i; $sfile=$i; }; } } print "$sfile - is the latest file \n"; This should work. -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
- newbie : how to find the latest file in a directory Dolfen, Stefan
- Re: newbie : how to find the latest file in a direc... nafiseh saberi
- Re: newbie : how to find the latest file in a direc... Sudarsan Raghavan
- Re: newbie : how to find the latest file in a direc... Rex Arul
- Re: newbie : how to find the latest file in a d... Sudarsan Raghavan
- RE: newbie : how to find the latest file in a direc... N_Dinesh
- RE: newbie : how to find the latest file in a direc... RArul
- RE: newbie : how to find the latest file in a direc... Bob Showalter