![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Use awk to create new folder in current directory | ccox85 | Shell Programming and Scripting | 6 | 01-28-2008 03:59 AM |
| Generating files with time interval of fifteen minutes | aajan | Shell Programming and Scripting | 0 | 09-25-2007 01:54 AM |
| Adding # minutes to current time... | gptavares | UNIX for Advanced & Expert Users | 7 | 06-25-2007 03:10 PM |
| how to display time in minutes n seconds... | santy | Shell Programming and Scripting | 1 | 08-23-2006 10:18 AM |
| time stamp of file create | nhatch | UNIX for Dummies Questions & Answers | 7 | 06-14-2004 10:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
How can I create a file with current time - 60 minutes
I'm using k-shell in unix and I want to create a file with the current system time - 60 minutes. I know I can use touch to create the file, but I'm having trouble specifying how tell it to use the current time less 60 minutes. Any ideas???
|
|
|||||
|
Use this:
Code:
perl -w -e '@mytime=localtime (time - $ARGV[0]); printf "%d%.2d%.2d%.2d%.2d", $mytime[5]+1900,$mytime[4]+1,$mytime[3],$mytime[2],$mytime[1];' 3600 This is part of a script that can find files created in the last few minutes or few hours. That script can be found here. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|