<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
	<title type="html"><![CDATA[Linux Forum &mdash; [Решено] Импорт torrent-файлов из Flush]]></title>
	<link rel="self" href="https://linuxforum.ru/extern.php?action=feed&amp;tid=24158&amp;type=atom" />
	<updated>2012-09-08T13:12:15Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=24158</id>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297612#p297612" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[D_Chu]]></name>
				<uri>https://linuxforum.ru/profile.php?id=104</uri>
			</author>
			<updated>2012-09-08T13:12:15Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297612#p297612</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297440#p297440" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Fat-Zer]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11911</uri>
			</author>
			<updated>2012-09-07T05:18:47Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297440#p297440</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297433#p297433" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[D_Chu]]></name>
				<uri>https://linuxforum.ru/profile.php?id=104</uri>
			</author>
			<updated>2012-09-07T02:50:11Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297433#p297433</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297330#p297330" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Fat-Zer]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11911</uri>
			</author>
			<updated>2012-09-06T10:57:32Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297330#p297330</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297229#p297229" />
			<content type="html"><![CDATA[<p><strong>Fat-Zer</strong>, не работает <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p>]]></content>
			<author>
				<name><![CDATA[D_Chu]]></name>
				<uri>https://linuxforum.ru/profile.php?id=104</uri>
			</author>
			<updated>2012-09-06T02:29:13Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297229#p297229</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: [Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297224#p297224" />
			<content type="html"><![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>]]></content>
			<author>
				<name><![CDATA[Fat-Zer]]></name>
				<uri>https://linuxforum.ru/profile.php?id=11911</uri>
			</author>
			<updated>2012-09-05T22:27:59Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297224#p297224</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[[Решено] Импорт torrent-файлов из Flush]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=297197#p297197" />
			<content type="html"><![CDATA[<p>Имеется торрент-клиент Flush<br />Все активные torrent-файлы хранятся в отдельных папках и имеют при этом одинаковое имя ~/.flush/torrents/очень_длинное_имя_папки/torrent.torrent<br />Подскажите, пожалуйста, как все эти файлы скопировать в отдельное место в виде очень_длинное_имя_папки.torrent или просто случайное_число.torrent<br />Главное, чтобы все torrent-файлы были в одной папке и с разными именами.</p>]]></content>
			<author>
				<name><![CDATA[D_Chu]]></name>
				<uri>https://linuxforum.ru/profile.php?id=104</uri>
			</author>
			<updated>2012-09-05T18:49:54Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=297197#p297197</id>
		</entry>
</feed>
