The UNIX and Linux Forums  


Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



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
finding duplicate files by size and finding pattern matching and its count jerome Sukumar Shell Programming and Scripting 2 12-01-2006 04:20 AM
finding files icecool1249 UNIX for Dummies Questions & Answers 3 03-29-2006 09:17 AM
Finding files with UTF-8 BOM kotoponus UNIX for Dummies Questions & Answers 0 05-20-2005 10:28 AM
finding files frustrated1 SUN Solaris 4 12-12-2003 06:12 AM
finding files jseiple UNIX for Dummies Questions & Answers 4 10-18-2001 06:24 AM

 
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1 (permalink)  
Old 06-24-2008
lestat_ecuador lestat_ecuador is offline
Registered User
  
 

Join Date: Oct 2006
Posts: 28
Exclamation Finding files

Hello guys,

Please your help, i need to find all the files writed in the last 5 minutes, but without create another file using touch (like im doing right now):

I am doing this:

Code:
  anio=`date +%Y`
  mes=`date +%m`
  dia=`date +%d`
  hora=`date +%H`
  minuto2=`date +%M`

  minuto=`expr $minuto2 - 5`

  fecha=$anio$mes$dia$hora$minuto
  
  touch -t $fecha dummyfile

  find . -name "*.trazas" -newer dummyfile
But if the date is for example 19:00 when i run my shell the variable minuto becomes -5 and there is an error in command touch.

Is there anny way to find directly files writed since the last 5 minutes?
 

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 01:49 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0