![]() |
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 |
| 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 |
| Perform action file name written to the pipe | fed.linuxgossip | Shell Programming and Scripting | 2 | 07-23-2008 11:38 AM |
| written a srcipt with 2 arguments | sam4now | Shell Programming and Scripting | 6 | 04-29-2008 06:06 AM |
| check written data | Hitori | Linux | 0 | 07-22-2006 09:46 AM |
| Checking a file is not being written to | kanejm | Shell Programming and Scripting | 14 | 01-20-2006 08:29 AM |
| Operating on a file being written by another application | GMMike | UNIX for Dummies Questions & Answers | 3 | 02-01-2005 04:06 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
Hello,
Which command in unix can tell whether a file is being used/written by another process. e.g. If one process is copying a very big file in some directory and there is another cronjob process which checks for a new file and in this directory and process the file. I want to check, if the file is still being written by the last process. Sanjay |
|
||||
|
Code:
#!/bin/ksh
x=`cksum File_Name.exp | awk '{print $1}'`
#sleep 1
y=`cksum File_Name | awk '{print $1}'`
if [ $x = $y ] ; then
echo "Both are same" $x $y
else
echo "Both are different" $x $y
fi
Is there any other good method ? Thanks for taking your time. Sanjay added code tags for readability --oombera Last edited by oombera; 02-18-2004 at 04:11 PM.. |
|
||||
|
Thanks for reply.
Unfortunately, I did not find isof utility/command in my unix system. I have SunOS 5.6 Generic_105181-23 sun4u sparc SUNW,Ultra-Enterprise. Is this utility has to be installed seprately or may be not in my path listing and also I did not find man isof as well. Sanjay |
|
|||||
|
Yes. It normally isn't installed (until revently).
You'll have to go get it, build it and install it. Go to this link... http://www.cert.org/security-improve...s/i042.05.html ...it's the best reference for me... ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|