<?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: &amp;quot;find&amp;quot; to change file name? in Operating System - Linux</title>
    <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051225#M96384</link>
    <description>Thanks Sandman</description>
    <pubDate>Tue, 05 Jun 2007 13:22:45 GMT</pubDate>
    <dc:creator>Coolmar</dc:creator>
    <dc:date>2007-06-05T13:22:45Z</dc:date>
    <item>
      <title>"find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051220#M96379</link>
      <description>I have some tif files throughout many subdirectories that are .TIF and I need to rename them .tif  - I figured I would use find but can't quite get the syntax right.  Here is what I have:&lt;BR /&gt;&lt;BR /&gt; find . -type f -name "*.TIF"|xargs -i mv {} {}.tif&lt;BR /&gt;&lt;BR /&gt;However, that just names it to file.TIF.tif&lt;BR /&gt;&lt;BR /&gt;So, I am close but no cigar...</description>
      <pubDate>Tue, 05 Jun 2007 12:50:21 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051220#M96379</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-06-05T12:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051221#M96380</link>
      <description>Try awk instead...&lt;BR /&gt;&lt;BR /&gt;# ls -1 *.TIF | awk -F".TIF$" '{system("mv "$0" "$1".tif")}'&lt;BR /&gt;&lt;BR /&gt;~cheers</description>
      <pubDate>Tue, 05 Jun 2007 12:58:28 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051221#M96380</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-05T12:58:28Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051222#M96381</link>
      <description>I am using find because these files are within subdirectories of subdirectories ... sometimes 10 deep.  So I figured I needed find for that.</description>
      <pubDate>Tue, 05 Jun 2007 13:00:39 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051222#M96381</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-06-05T13:00:39Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051223#M96382</link>
      <description>In that case use the one below:&lt;BR /&gt;&lt;BR /&gt;# find . -type f -name "*.TIF" | xargs -n1 awk -F".TIF$" '{system("mv "$0" "$1".tif")}'</description>
      <pubDate>Tue, 05 Jun 2007 13:04:02 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051223#M96382</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-05T13:04:02Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051224#M96383</link>
      <description>Ooops...without the xargs leading the pipelined command i.e.&lt;BR /&gt;&lt;BR /&gt;# find . -type f -name "*.TIF" | awk -F".TIF$" '{system("mv "$0" "$1".tif")}'</description>
      <pubDate>Tue, 05 Jun 2007 13:14:41 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051224#M96383</guid>
      <dc:creator>Sandman!</dc:creator>
      <dc:date>2007-06-05T13:14:41Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051225#M96384</link>
      <description>Thanks Sandman</description>
      <pubDate>Tue, 05 Jun 2007 13:22:45 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051225#M96384</guid>
      <dc:creator>Coolmar</dc:creator>
      <dc:date>2007-06-05T13:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: "find" to change file name?</title>
      <link>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051226#M96385</link>
      <description>&lt;!--!*#--&gt;You don't really need to use awk, you can directly use the shell (or sed):&lt;BR /&gt;&lt;BR /&gt;find . -type f -name "*.TIF" -exec rename_tif {} +&lt;BR /&gt;&lt;BR /&gt;rename_tif:&lt;BR /&gt;#!/usr/bin/ksh&lt;BR /&gt;# changes *.TIF to *.tif&lt;BR /&gt;# Doesn't handle embedded blanks&lt;BR /&gt;&lt;BR /&gt;for file in $*; do&lt;BR /&gt;   mv $file ${file#.TIF}.tif&lt;BR /&gt;done</description>
      <pubDate>Tue, 05 Jun 2007 22:03:30 GMT</pubDate>
      <guid>https://community.hpe.com/t5/operating-system-linux/quot-find-quot-to-change-file-name/m-p/5051226#M96385</guid>
      <dc:creator>Dennis Handly</dc:creator>
      <dc:date>2007-06-05T22:03:30Z</dc:date>
    </item>
  </channel>
</rss>

