Written by #xxaxxelxxApril 30, 2014August 19, 2015 Testing a file is currently locked. test -r $FILE && lsof $FILE > /dev/null || echo ‘FILE IS FREE’