<?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:  /usr/bin/find: Argument list too long error in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233234#M58963</link>
    <description>still doesn't work even after i added the path.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;Leah</description>
    <pubDate>Mon, 14 Jul 2008 16:09:03 GMT</pubDate>
    <dc:creator>Leah Chow</dc:creator>
    <dc:date>2008-07-14T16:09:03Z</dc:date>
    <item>
      <title>/usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233229#M58958</link>
      <description>I have a script to delete all the old oracle trace files, if the files are more than 30 days old.  &lt;BR /&gt;&lt;BR /&gt;find *.trc -mtime +$DAY_AFTER -exec rm {} \;&lt;BR /&gt;&lt;BR /&gt;but when i execute this command, i got ' Argument list too long' error, could someone help me on this?&lt;BR /&gt;&lt;BR /&gt;Thanks for your hlep&lt;BR /&gt;Leah</description>
      <pubDate>Mon, 14 Jul 2008 13:35:04 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233229#M58958</guid>
      <dc:creator>Leah Chow</dc:creator>
      <dc:date>2008-07-14T13:35:04Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233230#M58959</link>
      <description>It's because you have lots of .trc files and the shell is expanding that "*.trc" to a list that's longer than find can handle. You probably want something like this:&lt;BR /&gt;&lt;BR /&gt;find . -name '*.trc' -maxdepth 1 ....&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jul 2008 14:22:08 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233230#M58959</guid>
      <dc:creator>Heironimus</dc:creator>
      <dc:date>2008-07-14T14:22:08Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233231#M58960</link>
      <description>I would assume it is because you never gave it a path.&lt;BR /&gt;&lt;BR /&gt;find [insert_path_here] *.trc -mtime +$DAY_AFTER -exec rm {} \;</description>
      <pubDate>Mon, 14 Jul 2008 14:43:40 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233231#M58960</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-07-14T14:43:40Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233232#M58961</link>
      <description>actually before this find command, i have a &lt;BR /&gt;cd to the $PATH.  &lt;BR /&gt;&lt;BR /&gt;I am wondering whether i should change the system parameter or not?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jul 2008 14:51:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233232#M58961</guid>
      <dc:creator>Leah Chow</dc:creator>
      <dc:date>2008-07-14T14:51:30Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233233#M58962</link>
      <description>Even if you cd to the path you would need to put a "." for the path in the find statement. Otherwise it thinks that the path is *.trc, ehich could be "Argument list too long".</description>
      <pubDate>Mon, 14 Jul 2008 15:51:11 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233233#M58962</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-07-14T15:51:11Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233234#M58963</link>
      <description>still doesn't work even after i added the path.&lt;BR /&gt;&lt;BR /&gt;thanks&lt;BR /&gt;Leah</description>
      <pubDate>Mon, 14 Jul 2008 16:09:03 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233234#M58963</guid>
      <dc:creator>Leah Chow</dc:creator>
      <dc:date>2008-07-14T16:09:03Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233235#M58964</link>
      <description>jeez, you need to use -name also. look at Heironimus' example. here:&lt;BR /&gt;&lt;BR /&gt;find . -name '*.trc' -mtime +$DAY_AFTER -exec rm {} \;</description>
      <pubDate>Mon, 14 Jul 2008 16:33:38 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233235#M58964</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-07-14T16:33:38Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233236#M58965</link>
      <description>and ok, you technically don't need to put the "." for the path. I just think it makes it easier for others to understand where the find command is searching.</description>
      <pubDate>Mon, 14 Jul 2008 16:40:27 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233236#M58965</guid>
      <dc:creator>Court Campbell</dc:creator>
      <dc:date>2008-07-14T16:40:27Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233237#M58966</link>
      <description>thanks, i did add the maxdepth 1 , but i didn't pay attention on the -name, now it works, thanks a lot for your help.&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 14 Jul 2008 16:40:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/4233237#M58966</guid>
      <dc:creator>Leah Chow</dc:creator>
      <dc:date>2008-07-14T16:40:59Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008328#M58967</link>
      <description>&lt;P&gt;Bom dia,&lt;/P&gt;&lt;P&gt;Utilizei a sintax sugerida, porém continua retornando o erro:&lt;/P&gt;&lt;P&gt;&lt;FONT color="#000080"&gt;&lt;STRONG&gt;find ./clilog.txt -type f -mtime +0 -maxdepth 1 -exec rm -rf '{}' ';'&lt;/STRONG&gt;&lt;/FONT&gt;&lt;BR /&gt;/u/CA/WorkloadAutomation_R12/bin/cleanup_cli.sh: line 15: &lt;STRONG&gt;/usr/bin/find: Argument list too long&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Alguma ideia de como resolver isto?&lt;/STRONG&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 11:31:16 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008328#M58967</guid>
      <dc:creator>d4n13l</dc:creator>
      <dc:date>2018-06-08T11:31:16Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008329#M58968</link>
      <description>&lt;P&gt;Executei a linha abaixo e solucionou o problema:&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;find ./ -mindepth 1 -maxdepth 1 -name 'clilog.*' -type f -mtime +$1 -delete&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;Espero ter ajudado outros usuários!&lt;/P&gt;</description>
      <pubDate>Fri, 08 Jun 2018 12:17:43 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008329#M58968</guid>
      <dc:creator>d4n13l</dc:creator>
      <dc:date>2018-06-08T12:17:43Z</dc:date>
    </item>
    <item>
      <title>Re:  /usr/bin/find: Argument list too long error</title>
      <link>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008436#M58969</link>
      <description>&lt;P&gt;&amp;gt; I used the suggested syntax, but it still returns the error:&lt;/P&gt;&lt;P&gt;Not sure how you could get that error since you don't have any "*".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;STRONG&gt;&amp;gt; find ./ -mindepth 1 -maxdepth 1 -name 'clilog.*' -type f -mtime +$1 -delete&lt;/STRONG&gt;&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;-delete doesn't exist on HP-UX find(1).&amp;nbsp; You have to use: ... -exec rm -rf {} +&lt;/P&gt;</description>
      <pubDate>Mon, 11 Jun 2018 03:15:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/usr-bin-find-argument-list-too-long-error/m-p/7008436#M58969</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2018-06-11T03:15:05Z</dc:date>
    </item>
  </channel>
</rss>

