10-17-2008
Quote:
Originally Posted by
treesloth
I don't know if it would impose an unacceptable delay into the script, but a sleep might help. Check the filesize, sleep for 30 (or some other reasonable value) seconds, check filesize again, and compare. If the value is changed, rinse and repeat; if not, move the file.
lsof seems like a neater solution. I still might still use sleep to delay processing if lsof finds an open file ...or I'll just skip the file altogether and let it be processed at the next interval.
Thanks for the suggestions!
9 More Discussions You Might Find Interesting
1. Post Here to Contact Site Administrators and Moderators
Hi,
I am unable to view/open the image I uploded in one of the forums.
https://www.unix.com/showthread.php?t=37793&page=2&pp=20
Please help.
enc. (2 Replies)
Discussion started by: encrypted
2 Replies
2. UNIX for Advanced & Expert Users
Hi,
We are running FTP Server on UNIX (Solaris 9). Users login and upload (also download) files whenever required. Now, we have to automate the process which makes a copy of every file immediately after it gets uploaded to the FTP server (by any user).
I've ruled out rsync,mirror,filesync... (2 Replies)
Discussion started by: prvnrk
2 Replies
3. Shell Programming and Scripting
Hi All,
Here is a brief scenario for my requirement ..
There is a directory in FTP Server, where would files be uploaded on weekly basic.
I need to get those files which are uploaded during this week and not the files which are uploaded the previous week and download them to locale... (1 Reply)
Discussion started by: narramadan
1 Replies
4. Programming
How I can get the current make-file name in a make-file
So, if I run make with specified file:make -f target.mak
is it possible to have the 'target' inside of the that 'target.mak' from the file name? (2 Replies)
Discussion started by: alex_5161
2 Replies
5. UNIX and Linux Applications
Hi,
Is it possible to make sure/test that all uploaded files to my FTP will be of .RAR format (that's easy) but also password protected?
Thanks (0 Replies)
Discussion started by: saariko
0 Replies
6. Solaris
I would like to ask if you have a procedure on how to upload multiple private key for multiple users in solaris? I was only able to add one but when I tried to add several key, it fails.
example:
a. user1: user1.ppk
b. user2: user2.ppk
Each with different password on the server. Pls advise (6 Replies)
Discussion started by: lhareigh890
6 Replies
7. Shell Programming and Scripting
in /abc/jrd/
users are continuously uploading files memo*.txt
i have created a memo.sh file in that i have written
cd /abc/jrd/
mv memo*.txt /scripts/memo
while files are being moved to this /scripts/memo users who are uploading new file are not getting fully copied i this path i want that... (0 Replies)
Discussion started by: rakesh_mumbai
0 Replies
8. UNIX for Advanced & Expert Users
i want to move files from A dir to B dir, say eg: mv *memo*.txt /scripts/memo/
but while doing this new files are being uploaded by users, i dont want files which are being uploaded 5 to 10 min ago. other wise even files which are being currently uploaded will get moved to /scripts/memo. (8 Replies)
Discussion started by: rakesh_mumbai
8 Replies
9. UNIX for Dummies Questions & Answers
I am using VSFTPD on amazon web services and have a remote service that uploads files to server via FTP. The files comes through fine and when I log in via FTP client I see them. The problem is the files are supposed to be moved once uploaded but the files are not visible via command line thus the... (2 Replies)
Discussion started by: theman0684
2 Replies
LEARN ABOUT OPENSOLARIS
sleep
sleep(1) User Commands sleep(1)
NAME
sleep - suspend execution for an interval
SYNOPSIS
/usr/bin/sleep
/usr/bin/sleep time
ksh93
sleep time
DESCRIPTION
/usr/bin/sleep
sleep suspends execution for at least the integral number of seconds specified by time.
ksh93
sleep suspends execution for at least the time in seconds specified by time or until a SIGALRM signal is received.
OPERANDS
/usr/bin/sleep
The following operands are supported for /usr/bin/sleep:
time time in seconds can be specified as a non-negative decimal integer number.
ksh93
The following operands are supported:
time Specify time in seconds as a floating point number. The actual granularity depends on the underlying system, normally around 1 mil-
lisecond.
EXAMPLES
Example 1 Suspending Command Execution
The following example executes a command after a certain amount of time:
example% (sleep 105; command)&
Example 2 Executing a Command Every So Often
The following example executes a command every so often:
example% while true
do
command
sleep 37
done
ENVIRONMENT VARIABLES
See environ(5) for descriptions of the following environment variables that affect the execution of sleep: LANG, LC_ALL, LC_CTYPE, LC_MES-
SAGES, and NLSPATH.
EXIT STATUS
The following exit values are returned:
0 The execution was successfully suspended for at least time seconds, or a SIGALRM signal was received (see NOTES).
>0 An error has occurred.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
/usr/bin/sleep
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Committed |
+-----------------------------+-----------------------------+
|Standard |See standards(5). |
+-----------------------------+-----------------------------+
ksh93
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNWcsu |
+-----------------------------+-----------------------------+
|Interface Stability |Uncommitted |
+-----------------------------+-----------------------------+
SEE ALSO
ksh93(1), wait(1), alarm(2), sleep(3C), wait(3UCB), attributes(5), environ(5), standards(5)
NOTES
If the sleep utility receives a SIGALRM signal, one of the following actions is taken:
o Terminate normally with a zero exit status.
o Effectively ignore the signal.
The sleep utility takes the standard action for all other signals.
SunOS 5.11 20 Nov 2007 sleep(1)