Search Results

Search: Posts Made By: sajid.shah
4,026
Posted By zaxxon
The test if [ -e ${FOLDER}/${PID} ] ...
The test

if [ -e ${FOLDER}/${PID} ]

does not accept multiple values this way. Putting a set -x in the head of your script shows following:

+ '[' -e...
4,026
Posted By methyl
Referring to post #1 (we'll ignore post #2). ...
Referring to post #1 (we'll ignore post #2).
The script contains a fundamental logic error. If there is more than one file matching the pattern *.pid the variable $PID contains multiple values....
4,026
Posted By xoops
can be done with 1 find command find...
can be done with 1 find command


find /home/somefolder/pids -maxdepth 1 -type f -name "*.pid" -amin +40 -exec rm {} \;
4,026
Posted By zaxxon
Change it to -mmin (as -amin changes also when...
Change it to -mmin (as -amin changes also when someone issues a read like cat on it) and xoops solution will be best, if your find supports that switch. :b: Though you might check out the commented...
Showing results 1 to 4 of 4

 
All times are GMT -4. The time now is 03:26 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy