<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<oembed>
  <author_name>xinformation</author_name>
  <author_url>https://blog.hatena.ne.jp/xinformation/</author_url>
  <blog_title>日々ブログ</blog_title>
  <blog_url>https://xinformation.hatenadiary.com/</blog_url>
  <categories>
    <anon>プログラミングのお話</anon>
    <anon>プログラミングのお話-Linux</anon>
  </categories>
  <description>pythonで外部メディアにファイルを書き込みした際、 書き込みした結果同じ名前のフォルダが出来上がっていた。 中身はどうやら片方は外部メディアでもう一方は、内部ディスクとして認識されている。 原因：マウント前に書き込み処理が走っている 原因としては、外部メディアをマウント完了する前に書き込み処理が行われているのが原因でした。 書き込み処理の一貫で、フォルダが無ければ作成する処理も入れていたのが仇となりました。 対応としては、メディアをマウントしてから処理を開始すれば問題ありません。 systemd なら下記のようにsystemdでmountするサービスを作ります。 [Unit] Descri…</description>
  <height>190</height>
  <html>&lt;iframe src=&quot;https://hatenablog-parts.com/embed?url=https%3A%2F%2Fxinformation.hatenadiary.com%2Fentry%2F2025%2F10%2F09%2F070500&quot; title=&quot;【プログラミングのお話】linux で外付けメディアに書き込めなかった - 日々ブログ&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://cdn-ak.f.st-hatena.com/images/fotolife/x/xinformation/20251006/20251006232249.png</image_url>
  <provider_name>Hatena Blog</provider_name>
  <provider_url>https://hatena.blog</provider_url>
  <published>2025-10-09 07:05:00</published>
  <title>【プログラミングのお話】linux で外付けメディアに書き込めなかった</title>
  <type>rich</type>
  <url>https://xinformation.hatenadiary.com/entry/2025/10/09/070500</url>
  <version>1.0</version>
  <width>100%</width>
</oembed>
