Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Re: find the latest created file in a directory

by sureshepuri (Initiate)
on Apr 25, 2013 at 06:58 UTC ( [id://1030606]=note: print w/replies, xml ) Need Help??


in reply to find the latest created file in a directory

This can be done through unix command aswell. Not sure whether this suits your requirements #!/usr/bin/perl use strict; use warnings; my $latest_file=`find . -type f -printf '%T@ %p\n' | sort -n | tail -1 | cut -f2- -d" "`;
  • Comment on Re: find the latest created file in a directory

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1030606]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (4)
As of 2024-04-16 22:32 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found