![]() |
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 |
| Scan Rates | Negm | AIX | 2 | 04-16-2009 10:29 AM |
| Scan a log file | nhanda | Shell Programming and Scripting | 3 | 01-19-2009 09:19 PM |
| Please let me know Regarding Port Scan | myramkumar | UNIX for Advanced & Expert Users | 7 | 05-17-2007 11:11 AM |
| File Scan | Dastard | Shell Programming and Scripting | 2 | 04-08-2007 03:35 PM |
| IP Name scan | nicke30 | UNIX for Dummies Questions & Answers | 2 | 07-18-2001 05:32 AM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
||||
|
scan and move
i have a script to look for a file, but it moves a file that's being used.
i want to use: if file exists > 0, and not being updated/used in the last 2 minutes, move to /tmp i can do this much: if [ -s filename.txt ] then mv filename.txt /tmp else exit fi or how can i check if filename.txt is being used ? |
|
||||
|
or If you need to check if a file's updated in the last x minutes whether it's open or not, you could maybe pipe output from
ls -l <file> into a grep command to get the time, and check if that's in the last x minutes. (Not sure of the quickest way to do that right now) |
|
||||
|
fuser does the trick. thanks for your direction.
|
| Sponsored Links | ||
|
|