<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>oinume</author_name>
  <author_url>https://blog.hatena.ne.jp/oinume/</author_url>
  <blog_title>oinume journal</blog_title>
  <blog_url>https://oinume.hatenablog.com/</blog_url>
  <categories>
    <anon>Linux</anon>
  </categories>
  <description>bashには過去に実行したコマンドを履歴として残しているので、CTRL+pなどでその履歴をさかのぼり過去に実行したコマンドをそのまま実行したり、ちょこっと直して実行することができます。しかし、この便利な機能は一方で、 rm などのファイルを削除したりするような危険なコマンドを、履歴からいとも簡単に実行してしまい、結果として大切なファイルを消してしまったりするようなミスを誘発する恐れがあります。 そんなことを考える人に「特定のコマンドだけ履歴に残したくない(=.bash_historyに残さない)という技を紹介したいと思います。具体的には export HISTIGNORE='rm*:mv*' …</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Foinume.hatenablog.com%2Fentry%2Fwp%2F329&quot; title=&quot;bashでコマンド履歴を残さない方法 - oinume journal&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></image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2009-08-15 14:08:47</published>
  <title>bashでコマンド履歴を残さない方法</title>
  <type>rich</type>
  <url>https://oinume.hatenablog.com/entry/wp/329</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
