<?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=11764&amp;type=atom" />
	<updated>2011-03-11T17:07:57Z</updated>
	<generator>PunBB</generator>
	<id>https://linuxforum.ru/viewtopic.php?id=11764</id>
		<entry>
			<title type="html"><![CDATA[Re: Изменить даты доступа\изменения к файлам\папкам]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=155424#p155424" />
			<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 -print0 | xargs -0 command</div><br />иначе не работает <img src="https://linuxforum.ru/img/smilies/ac.gif" alt="ac" /></p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2011-03-11T17:07:57Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=155424#p155424</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Изменить даты доступа\изменения к файлам\папкам]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=155423#p155423" />
			<content type="html"><![CDATA[<div class="quotebox"><cite>Lupo Alberto пишет:</cite><blockquote><p>тогда команда touch будет применяться не каждому найденному файлу или каталогу, а ко всем аргументам одновременно, что, по идее, должно экономить время выполнения и ресурсы.</p></blockquote></div><p>а вот тут мне есть что добавить - find -exec touch {} + вовсе не засунет все файлы внутрь touch (как сделает тупая звёздочка), она будет пихать файлы внутрь команды отдельно размеченными максимальными порциями, как делает <strong>xargs</strong>. В итоге мы достигнем максимального быстродействия, и избежим переполнения.</p><p>В данном случае это не слишком важно (быстродействие), но если мы скажем добавляем файлы в архив, это увеличивает скорость примерно в 50..100 раз!</p>]]></content>
			<author>
				<name><![CDATA[drBatty]]></name>
				<uri>https://linuxforum.ru/profile.php?id=86</uri>
			</author>
			<updated>2011-03-11T17:03:23Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=155423#p155423</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Изменить даты доступа\изменения к файлам\папкам]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=155420#p155420" />
			<content type="html"><![CDATA[<p>Хотя в комментарии к изменению моей репутации уважаемый <strong>drBatty</strong> написал, что добавить нечего, я попробую.&nbsp; wink <br />И это касается не только этого случая, но общего применения конструкции <strong>find ... -exec ... {} \;</strong><br />В некоторых случаях (и в данном тоже) правильнее запускать команду так <strong>find ... -exec ... {} +</strong><br /></p><div class="codebox"><pre><code>find /DIR -type f -exec touch -d 20110101 {} +
find /DIR -type d -exec touch -d 20110101 {} +</code></pre></div><p>тогда команда <em>touch</em> будет применяться не каждому найденному файлу или каталогу, а ко всем аргументам одновременно, что, по идее, должно экономить время выполнения и ресурсы.</p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2011-03-11T16:52:05Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=155420#p155420</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Re: Изменить даты доступа\изменения к файлам\папкам]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=155397#p155397" />
			<content type="html"><![CDATA[<p>Изменить права к каталогам на дату 01 января 2011 года<br /></p><div class="codebox"><pre><code>find /DIR -type d -exec touch -d 20110101 {} \;</code></pre></div><p>Изменить права к файлам на дату 01 января 2011 года<br /></p><div class="codebox"><pre><code>find /DIR -type f -exec touch -d 20110101 {} \;</code></pre></div><p>P.S. Опция <strong>-a</strong> для команды <em>touch</em> меняет только время доступа, опция <strong>-m</strong> для команды <em>touch</em> меняет только время модификации.</p>]]></content>
			<author>
				<name><![CDATA[Lupo Alberto]]></name>
				<uri>https://linuxforum.ru/profile.php?id=9018</uri>
			</author>
			<updated>2011-03-11T15:46:52Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=155397#p155397</id>
		</entry>
		<entry>
			<title type="html"><![CDATA[Изменить даты доступа\изменения к файлам\папкам]]></title>
			<link rel="alternate" href="https://linuxforum.ru/viewtopic.php?pid=155393#p155393" />
			<content type="html"><![CDATA[<p>Всем привет! <br />Хочу изменить даты доступа\изменения к файлам\папкам желательно рекурсивно.<br />Кто нить знает как?</p>]]></content>
			<author>
				<name><![CDATA[Индустриальный Эльф]]></name>
				<uri>https://linuxforum.ru/profile.php?id=5594</uri>
			</author>
			<updated>2011-03-11T15:41:35Z</updated>
			<id>https://linuxforum.ru/viewtopic.php?pid=155393#p155393</id>
		</entry>
</feed>
