<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>anatofuz</author_name>
  <author_url>https://blog.hatena.ne.jp/anatofuz/</author_url>
  <blog_title>Acme::AnaTofuZ-&gt;new;</blog_title>
  <blog_url>https://anatofuz.hatenablog.com/</blog_url>
  <categories>
    <anon>シェル</anon>
  </categories>
  <description>シェルスクリプトの講義のTAが明日あるので、入門unixシェルプログラミングを見ていたところ面白いコマンドがあったので。 入門UNIXシェルプログラミング―シェルの基礎から学ぶUNIXの世界作者:ブルース・ブリン,Bruce Blinnメディア: 単行本 ファイルを消さずにゼロクリアするコマンドの紹介。 &gt;file : &gt;file このいずれかの方法で出来るらしい。 &gt;fileの場合は虚無をfileにリダイレクトしているのでゼロクリアされる。 : &gt;file の場合は、 何もしないコマンドである: の実行結果がfileにリダイレクトされるので0クリアされる。 ちなみにzshで上書き防止をしてい…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fanatofuz.hatenablog.com%2Fentry%2F2020%2F05%2F14%2F140415&quot; title=&quot;コマンド一発でファイルをゼロクリアする - Acme::AnaTofuZ-&amp;gt;new;&quot; class=&quot;embed-card embed-blogcard&quot; scrolling=&quot;no&quot; frameborder=&quot;0&quot; style=&quot;display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;&quot;&gt;&lt;/iframe&gt;</html>
  <image_url>https://m.media-amazon.com/images/I/51gWeaXVBFL._SL160_.jpg</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2020-05-14 14:04:15</published>
  <title>コマンド一発でファイルをゼロクリアする</title>
  <type>rich</type>
  <url>https://anatofuz.hatenablog.com/entry/2020/05/14/140415</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
