<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: script to check and kill procs in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932701#M102322</link>
    <description>I've used RAC's logic to find the files.&lt;BR /&gt;&lt;BR /&gt;This script would create a script full of rm statements that you could then run.&lt;BR /&gt;&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;rm /tmp/dascript&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;for i in $(&amp;lt; file_list)&lt;BR /&gt;do&lt;BR /&gt;pid=$(/usr/sbin/fuser -u ${i} 2&amp;gt;/dev/null)&lt;BR /&gt;if [[ ${pid} -eq "" ]];then&lt;BR /&gt;echo "rm " $i &amp;gt; /tmp/dascript&lt;BR /&gt;fi&lt;BR /&gt;done</description>
    <pubDate>Tue, 11 Oct 2005 06:50:47 GMT</pubDate>
    <dc:creator>Kent Ostby</dc:creator>
    <dc:date>2005-10-11T06:50:47Z</dc:date>
    <item>
      <title>script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932698#M102319</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;I am looking for a small script that will fuser a bunch of files in a directory then the files with no process' writing I want to list / remove.&lt;BR /&gt;&lt;BR /&gt;any ideas?&lt;BR /&gt;&lt;BR /&gt;Thanks</description>
      <pubDate>Tue, 11 Oct 2005 04:30:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932698#M102319</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2005-10-11T04:30:30Z</dc:date>
    </item>
    <item>
      <title>Re: script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932699#M102320</link>
      <description>Use can try as,&lt;BR /&gt;&lt;BR /&gt;#!/bin/ksh&lt;BR /&gt;DIR="/tmp"&lt;BR /&gt;&lt;BR /&gt;for file in `find $DIR -type f`&lt;BR /&gt;do&lt;BR /&gt;  pid=$(fuser -u $file 2&amp;gt;/dev/null)&lt;BR /&gt;  if [ -z $pid ]&lt;BR /&gt;  then&lt;BR /&gt;    echo "$file is not in use. Do you want to remote (Y/N)"&lt;BR /&gt;    rm -i $file&lt;BR /&gt;  fi&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;# END&lt;BR /&gt;&lt;BR /&gt;hth.</description>
      <pubDate>Tue, 11 Oct 2005 04:49:10 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932699#M102320</guid>
      <dc:creator>Muthukumar_5</dc:creator>
      <dc:date>2005-10-11T04:49:10Z</dc:date>
    </item>
    <item>
      <title>Re: script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932700#M102321</link>
      <description>for i in $(&amp;lt; file_list)&lt;BR /&gt;do&lt;BR /&gt;pid=$(/usr/sbin/fuser -u ${i} 2&amp;gt;/dev/null)&lt;BR /&gt;if [[ ${pid} -eq "" ]];then&lt;BR /&gt;echo "File - ${i} can be killed"&lt;BR /&gt;else&lt;BR /&gt;echo "File $(i) is being accesses by ${pid}"&lt;BR /&gt;echo "Can't be removed"&lt;BR /&gt;done&lt;BR /&gt;</description>
      <pubDate>Tue, 11 Oct 2005 05:12:49 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932700#M102321</guid>
      <dc:creator>RAC_1</dc:creator>
      <dc:date>2005-10-11T05:12:49Z</dc:date>
    </item>
    <item>
      <title>Re: script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932701#M102322</link>
      <description>I've used RAC's logic to find the files.&lt;BR /&gt;&lt;BR /&gt;This script would create a script full of rm statements that you could then run.&lt;BR /&gt;&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;rm /tmp/dascript&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;for i in $(&amp;lt; file_list)&lt;BR /&gt;do&lt;BR /&gt;pid=$(/usr/sbin/fuser -u ${i} 2&amp;gt;/dev/null)&lt;BR /&gt;if [[ ${pid} -eq "" ]];then&lt;BR /&gt;echo "rm " $i &amp;gt; /tmp/dascript&lt;BR /&gt;fi&lt;BR /&gt;done</description>
      <pubDate>Tue, 11 Oct 2005 06:50:47 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932701#M102322</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2005-10-11T06:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932702#M102323</link>
      <description>Oops .. an error in that.  Here's the repost:&lt;BR /&gt;&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;rm /tmp/dascript&lt;BR /&gt;touch /tmp/dascript&lt;BR /&gt;for i in $(&amp;lt; file_list)&lt;BR /&gt;do&lt;BR /&gt;pid=$(/usr/sbin/fuser -u ${i} 2&amp;gt;/dev/null)&lt;BR /&gt;if [[ ${pid} -eq "" ]];then&lt;BR /&gt;echo "rm " $i &amp;gt;&amp;gt; /tmp/dascript&lt;BR /&gt;fi&lt;BR /&gt;done</description>
      <pubDate>Tue, 11 Oct 2005 07:34:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932702#M102323</guid>
      <dc:creator>Kent Ostby</dc:creator>
      <dc:date>2005-10-11T07:34:11Z</dc:date>
    </item>
    <item>
      <title>Re: script to check and kill procs</title>
      <link>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932703#M102324</link>
      <description>ty very much</description>
      <pubDate>Tue, 11 Oct 2005 12:26:46 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/script-to-check-and-kill-procs/m-p/4932703#M102324</guid>
      <dc:creator>lawrenzo_1</dc:creator>
      <dc:date>2005-10-11T12:26:46Z</dc:date>
    </item>
  </channel>
</rss>

