<?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: finding large files in Operating System - HP-UX</title>
    <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226186#M171192</link>
    <description>one of my co-workers wrote this a loong time ago.&lt;BR /&gt;&lt;BR /&gt;usage:&lt;BR /&gt;./bigfiles &lt;PWD&gt; &lt;SIZE&gt;&lt;BR /&gt;./bigfiles /root 1000000&lt;BR /&gt;&lt;BR /&gt;#cat bigfiles&lt;BR /&gt;------------------------------cut here-------------------------&lt;BR /&gt;# cat bigfiles&lt;BR /&gt;# To find any file over a certain size in a given directory&lt;BR /&gt;# Primarily used to locate files which might be running a filesystem out of&lt;BR /&gt;# space.&lt;BR /&gt;#&lt;BR /&gt;# First parameter is the filesystem or directory to begin the search from&lt;BR /&gt;# Second parameter is the size of the file, in characters, to find&lt;BR /&gt;#&lt;BR /&gt;if [ $# -eq 2 ]&lt;BR /&gt;then&lt;BR /&gt;        if [ -d $1 ]&lt;BR /&gt;        then&lt;BR /&gt;        #ls -l `find "${1}" -xdev -size +"${2}"c  -print`&lt;BR /&gt;        find "${1}" -xdev -size +"${2}"c  -print &amp;gt; /tmp/crslist$$&lt;BR /&gt;                if [ -s /tmp/crslist$$ ]&lt;BR /&gt;                then&lt;BR /&gt;                ls -l `cat /tmp/crslist$$`&lt;BR /&gt;                else&lt;BR /&gt;                echo "apparently no files that large in "${1}&lt;BR /&gt;                exit&lt;BR /&gt;                fi&lt;BR /&gt;        else&lt;BR /&gt;        echo "$1 is not a directory...try again"&lt;BR /&gt;        exit&lt;BR /&gt;        fi&lt;BR /&gt;else&lt;BR /&gt;echo "\n\nbigfiles requires 2 parameters..."&lt;BR /&gt;echo "\tthe first is the beginning directory"&lt;BR /&gt;echo "\tthe second is the size of the file to search for\n\n"&lt;BR /&gt;fi&lt;/SIZE&gt;&lt;/PWD&gt;</description>
    <pubDate>Mon, 22 Mar 2004 16:38:20 GMT</pubDate>
    <dc:creator>Todd McDaniel_1</dc:creator>
    <dc:date>2004-03-22T16:38:20Z</dc:date>
    <item>
      <title>finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226183#M171189</link>
      <description>Can someone refresh me on the command i can use to find files that are a certain size or bigger? My /var keeps filling up. I would like to find all files 10mg and bigger but i forgot the command to use. ( i know to use find ) but just don't know the syntax.</description>
      <pubDate>Mon, 22 Mar 2004 16:34:57 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226183#M171189</guid>
      <dc:creator>Chris Fadrowski</dc:creator>
      <dc:date>2004-03-22T16:34:57Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226184#M171190</link>
      <description>find /var -size +10000000c</description>
      <pubDate>Mon, 22 Mar 2004 16:37:56 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226184#M171190</guid>
      <dc:creator>James A. Donovan</dc:creator>
      <dc:date>2004-03-22T16:37:56Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226185#M171191</link>
      <description>Hi Chris,&lt;BR /&gt;&lt;BR /&gt;find /var -size +10000000c -print&lt;BR /&gt;&lt;BR /&gt;for files &amp;gt; 10M&lt;BR /&gt;&lt;BR /&gt;Or try the following to see hogs in descending order&lt;BR /&gt;&lt;BR /&gt;du -akx /var | sort -nr | more&lt;BR /&gt;&lt;BR /&gt;HTH,&lt;BR /&gt;Jeff</description>
      <pubDate>Mon, 22 Mar 2004 16:38:19 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226185#M171191</guid>
      <dc:creator>Jeff Schussele</dc:creator>
      <dc:date>2004-03-22T16:38:19Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226186#M171192</link>
      <description>one of my co-workers wrote this a loong time ago.&lt;BR /&gt;&lt;BR /&gt;usage:&lt;BR /&gt;./bigfiles &lt;PWD&gt; &lt;SIZE&gt;&lt;BR /&gt;./bigfiles /root 1000000&lt;BR /&gt;&lt;BR /&gt;#cat bigfiles&lt;BR /&gt;------------------------------cut here-------------------------&lt;BR /&gt;# cat bigfiles&lt;BR /&gt;# To find any file over a certain size in a given directory&lt;BR /&gt;# Primarily used to locate files which might be running a filesystem out of&lt;BR /&gt;# space.&lt;BR /&gt;#&lt;BR /&gt;# First parameter is the filesystem or directory to begin the search from&lt;BR /&gt;# Second parameter is the size of the file, in characters, to find&lt;BR /&gt;#&lt;BR /&gt;if [ $# -eq 2 ]&lt;BR /&gt;then&lt;BR /&gt;        if [ -d $1 ]&lt;BR /&gt;        then&lt;BR /&gt;        #ls -l `find "${1}" -xdev -size +"${2}"c  -print`&lt;BR /&gt;        find "${1}" -xdev -size +"${2}"c  -print &amp;gt; /tmp/crslist$$&lt;BR /&gt;                if [ -s /tmp/crslist$$ ]&lt;BR /&gt;                then&lt;BR /&gt;                ls -l `cat /tmp/crslist$$`&lt;BR /&gt;                else&lt;BR /&gt;                echo "apparently no files that large in "${1}&lt;BR /&gt;                exit&lt;BR /&gt;                fi&lt;BR /&gt;        else&lt;BR /&gt;        echo "$1 is not a directory...try again"&lt;BR /&gt;        exit&lt;BR /&gt;        fi&lt;BR /&gt;else&lt;BR /&gt;echo "\n\nbigfiles requires 2 parameters..."&lt;BR /&gt;echo "\tthe first is the beginning directory"&lt;BR /&gt;echo "\tthe second is the size of the file to search for\n\n"&lt;BR /&gt;fi&lt;/SIZE&gt;&lt;/PWD&gt;</description>
      <pubDate>Mon, 22 Mar 2004 16:38:20 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226186#M171192</guid>
      <dc:creator>Todd McDaniel_1</dc:creator>
      <dc:date>2004-03-22T16:38:20Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226187#M171193</link>
      <description>find /var -size +1000000c -print</description>
      <pubDate>Mon, 22 Mar 2004 16:39:07 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226187#M171193</guid>
      <dc:creator>Michael Tully</dc:creator>
      <dc:date>2004-03-22T16:39:07Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226188#M171194</link>
      <description>Many friends have given syntax for find command and I will also suggest to do cleanup to reduce /var. Do man on cleanup command, you can preview it and than do it. You may not have to delete anything manually. Its very useful.</description>
      <pubDate>Mon, 22 Mar 2004 19:47:55 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226188#M171194</guid>
      <dc:creator>SS_6</dc:creator>
      <dc:date>2004-03-22T19:47:55Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226189#M171195</link>
      <description>Very common mistake (looking for big files). /var is a VERY dynamic (variable) filesystem and will easily fill up causing serious problems. Since there many different subsystems that use /var, the first thing to do is to find big DIRECTORIES, not big files. This will isolate the real reason for /var filling up. Use this command:&lt;BR /&gt; &lt;BR /&gt;du -kx /var | sort -rn | more&lt;BR /&gt; &lt;BR /&gt;The few directories at the top of the list are the ones to look at. There may be a directory that has 10,000 files that are 1meg in size...that's 10Gb but not a single big file at all. Here are some typical scenarios:&lt;BR /&gt; &lt;BR /&gt;/var/adm/sw (patches and installed s/ware--use cleanup)&lt;BR /&gt; &lt;BR /&gt;/var/adm (logfiles)&lt;BR /&gt;/var/spool/lp/request (spooler files)&lt;BR /&gt;/var/mail(email files)&lt;BR /&gt; &lt;BR /&gt;Once you've found a big directory, use ll to sort by size:&lt;BR /&gt; &lt;BR /&gt;ll | sort -rnk5 | more&lt;BR /&gt; &lt;BR /&gt;Now you can effectively cleanup the results. If your /var is less than 1Gb, double it and then create a trim script for cron to run each day.</description>
      <pubDate>Mon, 22 Mar 2004 20:58:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226189#M171195</guid>
      <dc:creator>Bill Hassell</dc:creator>
      <dc:date>2004-03-22T20:58:03Z</dc:date>
    </item>
    <item>
      <title>Re: finding large files</title>
      <link>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226190#M171196</link>
      <description>find /var -size +10000000c -exec ls -l \;&lt;BR /&gt;&lt;BR /&gt;this command find files &amp;gt; to 10 mb and list.&lt;BR /&gt;Bye.&lt;BR /&gt;&lt;BR /&gt;J.E.A.</description>
      <pubDate>Fri, 09 Jun 2006 09:06:35 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-hp-ux/finding-large-files/m-p/3226190#M171196</guid>
      <dc:creator>Julián Esteban Aimar</dc:creator>
      <dc:date>2006-06-09T09:06:35Z</dc:date>
    </item>
  </channel>
</rss>

