The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Dummies Questions & Answers
Google UNIX.COM


UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
while loop and delay asadlone Shell Programming and Scripting 5 06-22-2007 10:05 AM
Delay a process. ugp High Level Programming 2 03-08-2006 08:00 AM
end-end packet delay? yogesh_powar IP Networking 4 12-13-2005 10:21 AM
Introducing Delay less then a second. S.Vishwanath High Level Programming 3 06-14-2004 02:10 AM
Login Delay SmartJuniorUnix UNIX for Dummies Questions & Answers 1 03-27-2001 08:38 AM

Closed Thread
 
Submit Tools LinkBack Thread Tools Display Modes
  #1  
Old 01-04-2002
buRst
Guest
 

Posts: n/a
Delay in mv

Working on AIX 4.3
I have an active exe that accepts files for processing on our RS6000. Day to day i store these files in a secure place and at the end of the day I mv them one by one. After some reading and ofcourse trial and error i figured out that this helps...

mv `ls -l |head -l | awk '{print$9}'` /dir1/dir2

Did not realize that by doing this I clogged my input to the exe to a great extent.

Q is , is there a way that i can put a 5 minute delay between moving each file?

wud appreciate any input

thnx
Forum Sponsor
  #2  
Old 01-05-2002
TioTony's Avatar
Bit Pusher
 

Join Date: Oct 2001
Location: Southern California
Posts: 332
You could try something like this:

#!/bin/sh
files=`ls -l |head -l | awk '{print$9}'`
for i in $files
do
mv $i /dir1/dir2
sleep 600
done
  #3  
Old 01-13-2002
buRst
Guest
 

Posts: n/a
Thnx TToni,
I did have to change it a bit since all the hidden files were being moved too.. but the general layout helped..
thnx once again
Google The UNIX and Linux Forums
Closed Thread

Thread Tools
Display Modes




All times are GMT -7. The time now is 01:40 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008. All Rights Reserved.Ad Management by RedTyger Visit The Complex Event Processing Blog

Content Relevant URLs by vBSEO 3.2.0