<?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: Find Command + Case Insensitive in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661451#M102552</link>
    <description>Hi James:&lt;BR /&gt;&lt;BR /&gt;Yet another alternative is to craft your own using perl.  'stat() will yield the values for the 'ls' output.  The 'File::Find' module will drive the recursive directory lookup.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
    <pubDate>Mon, 31 Oct 2005 16:38:58 GMT</pubDate>
    <dc:creator>James R. Ferguson</dc:creator>
    <dc:date>2005-10-31T16:38:58Z</dc:date>
    <item>
      <title>Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661447#M102548</link>
      <description>I am attempting to write a shell script that searches for two differently named files that were created  the day before the system time, then add up those file sizes.  &lt;BR /&gt;&lt;BR /&gt;I have:&lt;BR /&gt;DIRS="DIR1 DIR2 DIR3 DIR4"&lt;BR /&gt;&lt;BR /&gt;for dir in $DIRS; do&lt;BR /&gt;echo -e "$dir:  " &amp;amp;&amp;amp; find . \( -name "${dir}_*" -o -name "c-*" \) -ctime -1 -exec ls -l {} \; |awk '/^-/ {total += $5} END {printf "%15.2f\n",total}'&lt;BR /&gt;done&lt;BR /&gt;&lt;BR /&gt;Which mostly works, it just has 1 problem.  I need the name to not be case sensitive.  I thought -iname would do the trick, but it does not seem to be valid.  I would greatly appreciate some help.  &lt;BR /&gt;&lt;BR /&gt;The reason it needs to be case insensitive is because 1 dir is lowercase, and the files in it are uppercase.&lt;BR /&gt;&lt;BR /&gt;Ex:  &lt;BR /&gt;dir = test&lt;BR /&gt;file = TEST_1122333&lt;BR /&gt;&lt;BR /&gt;Thanks!&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2005 16:19:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661447#M102548</guid>
      <dc:creator>james eacret</dc:creator>
      <dc:date>2005-10-31T16:19:45Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661448#M102549</link>
      <description>You need to get the gnu find from the Porting and Archive center. it has the iname option.&lt;BR /&gt; &lt;BR /&gt;&lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.20/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.20/&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;HTH&lt;BR /&gt; &lt;BR /&gt;-- Rod Hills</description>
      <pubDate>Mon, 31 Oct 2005 16:27:18 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661448#M102549</guid>
      <dc:creator>Rodney Hills</dc:creator>
      <dc:date>2005-10-31T16:27:18Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661449#M102550</link>
      <description>Hi James:&lt;BR /&gt;You might want to download the gnu findutils available from &lt;A href="http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.20/" target="_blank"&gt;http://hpux.cs.utah.edu/hppd/hpux/Gnu/findutils-4.2.20/&lt;/A&gt; or your nearest porting and archiving centre.  it supports -iname.&lt;BR /&gt;&lt;BR /&gt;Enjoy.</description>
      <pubDate>Mon, 31 Oct 2005 16:28:05 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661449#M102550</guid>
      <dc:creator>Kofi ARTHIABAH</dc:creator>
      <dc:date>2005-10-31T16:28:05Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661450#M102551</link>
      <description>Hello, thank you.  I will talk to the server admin about installing that.&lt;BR /&gt;&lt;BR /&gt;James</description>
      <pubDate>Mon, 31 Oct 2005 16:37:59 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661450#M102551</guid>
      <dc:creator>james eacret</dc:creator>
      <dc:date>2005-10-31T16:37:59Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661451#M102552</link>
      <description>Hi James:&lt;BR /&gt;&lt;BR /&gt;Yet another alternative is to craft your own using perl.  'stat() will yield the values for the 'ls' output.  The 'File::Find' module will drive the recursive directory lookup.&lt;BR /&gt;&lt;BR /&gt;Regards!&lt;BR /&gt;&lt;BR /&gt;...JRF...</description>
      <pubDate>Mon, 31 Oct 2005 16:38:58 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661451#M102552</guid>
      <dc:creator>James R. Ferguson</dc:creator>
      <dc:date>2005-10-31T16:38:58Z</dc:date>
    </item>
    <item>
      <title>Re: Find Command + Case Insensitive</title>
      <link>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661452#M102553</link>
      <description>The Gnu version of find will do this quite easily but if you insist upon using standard find then you need to construct -name patterns that look like this:&lt;BR /&gt;&lt;BR /&gt;-name "[Dd][Ii][Rr]1"&lt;BR /&gt;&lt;BR /&gt;Here's a function that will do that:&lt;BR /&gt;&lt;BR /&gt;#!/usr/bin/sh&lt;BR /&gt;&lt;BR /&gt;make_regex()&lt;BR /&gt;{&lt;BR /&gt;  typeset -u UC="${1}" &lt;BR /&gt;  typeset -i LEN=$(expr length "${UC}")&lt;BR /&gt;  typeset -i I=1&lt;BR /&gt;  typeset OUT=''&lt;BR /&gt;  while [[ ${I} -le ${LEN} ]]&lt;BR /&gt;    do&lt;BR /&gt;      typeset U1=$(echo ${UC} | cut -c ${I}-${I})&lt;BR /&gt;      typeset L1=$(echo ${U1} | tr "[A-Z]" "[a-z]")&lt;BR /&gt;      if [[ "${U1}" != "${L1}" ]] # is alpha&lt;BR /&gt;        then&lt;BR /&gt;          OUT="${OUT}[${U1}${L1}]"&lt;BR /&gt;        else&lt;BR /&gt;          OUT="${OUT}${U1}"&lt;BR /&gt;        fi&lt;BR /&gt;      ((I += 1))&lt;BR /&gt;    done&lt;BR /&gt;  echo "${OUT}"&lt;BR /&gt;  return 0&lt;BR /&gt;} # make_regex&lt;BR /&gt;&lt;BR /&gt;# use it like this:&lt;BR /&gt;&lt;BR /&gt;while [[ ${#} -ge 1 ]]&lt;BR /&gt;  do&lt;BR /&gt;    X=$(make_regex "${1}")&lt;BR /&gt;    echo "${1} ==&amp;gt; ${X}"&lt;BR /&gt;    shift&lt;BR /&gt;  done&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Mon, 31 Oct 2005 16:57:13 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/find-command-case-insensitive/m-p/3661452#M102553</guid>
      <dc:creator>A. Clay Stephenson</dc:creator>
      <dc:date>2005-10-31T16:57:13Z</dc:date>
    </item>
  </channel>
</rss>

