<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
	<channel>
		<title><![CDATA[Linux Forum &mdash; [Решено] Импорт torrent-файлов из Flush]]></title>
		<link>https://linuxforum.ru/viewtopic.php?id=24158</link>
		<atom:link href="https://linuxforum.ru/extern.php?action=feed&amp;tid=24158&amp;type=rss" rel="self" type="application/rss+xml" />
		<description><![CDATA[Недавние сообщения в теме «[Решено] Импорт torrent-файлов из Flush».]]></description>
		<lastBuildDate>Sat, 08 Sep 2012 13:12:15 +0000</lastBuildDate>
		<generator>PunBB</generator>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297612#p297612</link>
			<description><![CDATA[<div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>лучше даже вот так будет:<br /><strong>find ./ -iname &#039;torrent.torrent&#039; -type f&nbsp; | sed -r &#039;s!^\./(.+)/torrent\.torrent$!cp &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!&#039;</strong></p></blockquote></div><div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>если всё понравилось, то в конец sed-скрипта допиши e.</p></blockquote></div><p>Спасибо, этот вариант работает (с &quot;e&quot; в конце)<br />Единственное, что пришлось руками создавать папку .flush/torrents/ в папке назначения (пока не создал папку, писало что &quot;cp: невозможно создать обычный файл&quot;)</p>]]></description>
			<author><![CDATA[null@example.com (D_Chu)]]></author>
			<pubDate>Sat, 08 Sep 2012 13:12:15 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297612#p297612</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297440#p297440</link>
			<description><![CDATA[<div class="quotebox"><cite>D_Chu пишет:</cite><blockquote><p>но имена полученных файлов это одна цифра или буква с расширением .torrent</p></blockquote></div><p>ну да... моя ошибка... я там намудрил всякой лабуды...<br /></p><div class="quotebox"><cite>D_Chu пишет:</cite><blockquote><p>но файлов в конечной папке нет. Права на папку в порядке.</p></blockquote></div><div class="quotebox"><cite>Fat-Zer пишет:</cite><blockquote><p>если всё понравилось, то в конец sed-скрипта допиши e.</p></blockquote></div>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Fri, 07 Sep 2012 05:18:47 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297440#p297440</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297433#p297433</link>
			<description><![CDATA[<p><strong>Fat-Zer</strong>, вот этот вариант работает </p><div class="codebox"><pre><code>find ./ -iname &#039;*.torrent&#039; -type f  | sed -r &#039;s!^.*/?(.+)/.+\.torrent$!mv &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!e&#039;</code></pre></div><p> но имена полученных файлов это одна цифра или буква с расширением .torrent<br />Этот вариант </p><div class="codebox"><pre><code>find ./ -iname &#039;torrent.torrent&#039; -type f  | sed -r &#039;s!^\./(.+)/torrent\.torrent$!cp &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!&#039;</code></pre></div><p> дает вывод такого вида </p><div class="codebox"><pre><code>cp &quot;./.flush/torrents/cbca8520698d18eed6c9c1857e69875fe4495d81/torrent.torrent&quot; &quot;/data/torrents/.flush/torrents/cbca8520698d18eed6c9c1857e69875fe4495d81.torrent&quot;</code></pre></div><p> но файлов в конечной папке нет. Права на папку в порядке.</p>]]></description>
			<author><![CDATA[null@example.com (D_Chu)]]></author>
			<pubDate>Fri, 07 Sep 2012 02:50:11 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297433#p297433</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297330#p297330</link>
			<description><![CDATA[<div class="codebox"><pre><code>alexander@goblin /tmp $ mkdir test
alexander@goblin /tmp $ cd test
alexander@goblin /tmp/test $ mkdir {1..8}
alexander@goblin /tmp/test $ touch {1..8}/torrent.torrent
alexander@goblin /tmp/test $ mkdir ../dest
alexander@goblin /tmp/test $ tree
.
├── 1
│   └── torrent.torrent
├── 2
│   └── torrent.torrent
├── 3
│   └── torrent.torrent
├── 4
│   └── torrent.torrent
├── 5
│   └── torrent.torrent
├── 6
│   └── torrent.torrent
├── 7
│   └── torrent.torrent
└── 8
    └── torrent.torrent

8 directories, 8 files
alexander@goblin /tmp/test $ find ./ -iname &#039;*.torrent&#039; -type f  | sed -r &#039;s!^.*/?(.+)/.+\.torrent$!mv &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!&#039;
mv &quot;./8/torrent.torrent&quot; &quot;/tmp/dest/8.torrent&quot;
mv &quot;./7/torrent.torrent&quot; &quot;/tmp/dest/7.torrent&quot;
mv &quot;./6/torrent.torrent&quot; &quot;/tmp/dest/6.torrent&quot;
mv &quot;./5/torrent.torrent&quot; &quot;/tmp/dest/5.torrent&quot;
mv &quot;./4/torrent.torrent&quot; &quot;/tmp/dest/4.torrent&quot;
mv &quot;./3/torrent.torrent&quot; &quot;/tmp/dest/3.torrent&quot;
mv &quot;./2/torrent.torrent&quot; &quot;/tmp/dest/2.torrent&quot;
mv &quot;./1/torrent.torrent&quot; &quot;/tmp/dest/1.torrent&quot;
alexander@goblin /tmp/test $ find ./ -iname &#039;*.torrent&#039; -type f  | sed -r &#039;s!^.*/?(.+)/.+\.torrent$!mv &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!e&#039;








alexander@goblin /tmp/test $ ls -al ../dest
итого 0
drwxr-xr-x  2 alexander users  200 сент.  6 14:50 .
drwxrwxrwt 27 root      root  2540 сент.  6 14:49 ..
-rw-r--r--  1 alexander users    0 сент.  6 14:49 1.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 2.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 3.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 4.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 5.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 6.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 7.torrent
-rw-r--r--  1 alexander users    0 сент.  6 14:49 8.torrent</code></pre></div><p>один слеш лишний был... </p><p>лучше даже вот так будет:<br /><strong>find ./ -iname &#039;torrent.torrent&#039; -type f&nbsp; | sed -r &#039;s!^\./(.+)/torrent\.torrent$!cp &quot;&amp;&quot; &quot;/tmp/dest/\1.torrent&quot;!&#039;</strong></p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Thu, 06 Sep 2012 10:57:32 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297330#p297330</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297229#p297229</link>
			<description><![CDATA[<p><strong>Fat-Zer</strong>, не работает <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p>]]></description>
			<author><![CDATA[null@example.com (D_Chu)]]></author>
			<pubDate>Thu, 06 Sep 2012 02:29:13 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297229#p297229</guid>
		</item>
		<item>
			<title><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297224#p297224</link>
			<description><![CDATA[<p><strong>cd ~/.flush/torrents/ &amp;&amp; find ./ -iname &#039;*.torrent&#039; -type f&nbsp; | sed -r &#039;s!^.*/?(.+)/.+\.torrent$!mv &quot;\&amp;&quot; &quot;/dest/folder/\1.torrent&quot;!&#039;</strong><br />если всё понравилось, то в конец sed-скрипта допиши <strong>e</strong>.<br />[не тестил]</p>]]></description>
			<author><![CDATA[null@example.com (Fat-Zer)]]></author>
			<pubDate>Wed, 05 Sep 2012 22:27:59 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297224#p297224</guid>
		</item>
		<item>
			<title><![CDATA[[Решено] Импорт torrent-файлов из Flush]]></title>
			<link>https://linuxforum.ru/viewtopic.php?pid=297197#p297197</link>
			<description><![CDATA[<p>Имеется торрент-клиент Flush<br />Все активные torrent-файлы хранятся в отдельных папках и имеют при этом одинаковое имя ~/.flush/torrents/очень_длинное_имя_папки/torrent.torrent<br />Подскажите, пожалуйста, как все эти файлы скопировать в отдельное место в виде очень_длинное_имя_папки.torrent или просто случайное_число.torrent<br />Главное, чтобы все torrent-файлы были в одной папке и с разными именами.</p>]]></description>
			<author><![CDATA[null@example.com (D_Chu)]]></author>
			<pubDate>Wed, 05 Sep 2012 18:49:54 +0000</pubDate>
			<guid>https://linuxforum.ru/viewtopic.php?pid=297197#p297197</guid>
		</item>
	</channel>
</rss>
