Note: The archives category content is an automatically generated focus channel and does not neccessarily reflect the opinions of this blog. No responsibility is taken for the external links presented here, follow at your own discretion.
The archives content is never scraped from sites - but an abstract obtained from search engines.
| Problem |
Solution |
Example |
Reference |
Recommended |
You want to view seconds since last change or use Perl to process a number of files. Or maybe you just want a programmatic way to deal with file details, using something similar to the UNIX stat C routine.
|
|
| Problem |
Solution |
Example |
Reference |
Recommended |
Excellent for showing the exact time in seconds, since the last change. Rather than the normal hours and minutes from ls. Replace /tmp/js with filename. $ perl -e '$ctime=(stat("/tmp/js"))[10];print("$ctime\n");' 1181102779
|
Leave a Reply
June 6th, 2007 at 8:36 pm
[…] Perl Coding School ยป File handling - UNIX stat (tags: Perl file handling stat UNIX Coding School) Subscribe to techie blogs central by Email […]