<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; групповое переименование файлов]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=36150&amp;type=atom" />
	<updated>2014-09-23T07:33:48Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=36150</id>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423297#p423297" />
			<content type="html"><![CDATA[<p>Всем спасибо!<br />Решил задачу, с помощью команды:<br /></p><div class="codebox"><pre><code>rename &#039;s/file/new/&#039; *file*</code></pre></div>]]></content>
			<author>
				<name><![CDATA[v0id]]></name>
				<uri>https://linuxforum.ru/profile.php?id=20738</uri>
			</author>
			<updated>2014-09-23T07:33:48Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423297#p423297</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423279#p423279" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>v0id пишет:</cite><blockquote><p>Так не работает</p></blockquote></div><p>man rename читали? Ну вот и не работает.</p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2014-09-23T00:12:29Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423279#p423279</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423225#p423225" />
			<content type="html"><![CDATA[<p>Немного грубо но для вашей задачи подойдет:</p><p><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">#!/bin/bash</p><p>_SOURCEDIR=&quot;/home/user/test&quot; # в какой папке ищем<br />_FROMNAME=&quot;file&quot; # что нужно заменить в файле<br />_TONAME=&quot;new&quot; # на что нужно заменить</p><p>find $_SOURCEDIR/$_FROMNAME* -type f | while read F; do<br />&nbsp; &nbsp; mv -vf &quot;$F&quot; &quot;$(dirname &quot;$F&quot;)/$(basename &quot;$F&quot; | sed &#039;s|&#039;$_FROMNAME&#039;|&#039;$_TONAME&#039;|&#039;)&quot;;<br />done</div></p>]]></content>
			<author>
				<name><![CDATA[beliy]]></name>
				<uri>https://linuxforum.ru/profile.php?id=34742</uri>
			</author>
			<updated>2014-09-22T11:47:42Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423225#p423225</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423223#p423223" />
			<content type="html"><![CDATA[<p>Так не работает <br /></p><div class="codebox"><pre><code>Bareword &quot;file&quot; not allowed while &quot;strict subs&quot; in use at (eval 1) line 1.
xargs: rename: exited with status 255; aborting</code></pre></div>]]></content>
			<author>
				<name><![CDATA[v0id]]></name>
				<uri>https://linuxforum.ru/profile.php?id=20738</uri>
			</author>
			<updated>2014-09-22T11:43:06Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423223#p423223</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423217#p423217" />
			<content type="html"><![CDATA[<p><strong>v0id</strong>, <br /></p><div class="quotebox"><blockquote><p>DESCRIPTION<br />&nbsp; &nbsp; &nbsp; &nbsp;rename&nbsp; will&nbsp; rename&nbsp; the&nbsp; specified&nbsp; files by replacing the first occurrence of expression in<br />&nbsp; &nbsp; &nbsp; &nbsp;their name by replacement.</p><p>OPTIONS<br />&nbsp; &nbsp; &nbsp; &nbsp;-v, --verbose<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Give visual feedback which files where renamed, if any.</p><p>&nbsp; &nbsp; &nbsp; &nbsp;-V, --version<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display version information and exit.</p><p>&nbsp; &nbsp; &nbsp; &nbsp;-h, --help<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Display help text and exit.</p><p>EXAMPLES<br />&nbsp; &nbsp; &nbsp; &nbsp;Given the files foo1, ..., foo9, foo10, ..., foo278, the commands</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rename foo foo0 foo?<br />&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rename foo foo0 foo??</p><p>&nbsp; &nbsp; &nbsp; &nbsp;will turn them into foo001, ..., foo009, foo010, ..., foo278.&nbsp; And</p><p>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; rename .htm .html *.htm</p><p>&nbsp; &nbsp; &nbsp; &nbsp;will fix the extension of your html files.</p></blockquote></div>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2014-09-22T11:33:28Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423217#p423217</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423216#p423216" />
			<content type="html"><![CDATA[<p>как то так<br /><div class="termtitle" style="font-family: sans-serif; position:relative; height:auto; width:auto; background:#3A4061; color:#FFFFFF; padding: 1px;"><b> Консоль:</b></div>
<div class="termcont" style="font-family: Terminus; position:relative; height:auto; width:auto; overflow-x:scroll; white-space: nowrap ; overflow-y:auto;background:#000000; color:#4EF44E; line-height:1.2; padding: 3px; font-size: 1rem; max-height: 60vh">find /some/dir -name &quot;*file*&quot;|xargs rename file new</div></p>]]></content>
			<author>
				<name><![CDATA[baralgin]]></name>
				<uri>https://linuxforum.ru/profile.php?id=31498</uri>
			</author>
			<updated>2014-09-22T11:31:18Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423216#p423216</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[групповое переименование файлов]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=423206#p423206" />
			<content type="html"><![CDATA[<p>Доброго времени суток!<br />Подскажите как решить задачку.<br />Есть много файлов file[X] где X какое-то число.<br />Нужно переименовать file[X] в new[X], число должно остаться неизменным.</p>]]></content>
			<author>
				<name><![CDATA[v0id]]></name>
				<uri>https://linuxforum.ru/profile.php?id=20738</uri>
			</author>
			<updated>2014-09-22T10:30:51Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=423206#p423206</id>
		</entry>
</feed>
