Results 1 to 2 of 2
Thread: check open file using lsof
Enjoy an ad free experience by logging in. Not a member yet? Register.
- Join Date
- Nov 2010
check open file using lsof
I create following bash script part to check open files on my remote server.
ssh -T $S_LOGIN <<EOI open_File=`lsof +D /x01/files/scripts/ |grep -v "DIR"|wc -l` echo "open file count : \$open_File" if ["$Open_File" -gt 1]; then echo "Warning:Folder have following open files" lsof +D /x01/files/scripts |grep -v "DIR" else echo "No Open files "; fi exit; EOI
Last edited by charith; 12-12-2011 at 05:34 PM. Reason: update
$Open_File and $open_File are not the same variablelinux user # 503963