<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>linux &amp;mdash; Plain text</title>
    <link>https://plain-text.cc/tag:linux</link>
    <description>A blog about computers and living things</description>
    <pubDate>Wed, 06 May 2026 11:59:08 +0200</pubDate>
    <item>
      <title>About me</title>
      <link>https://plain-text.cc/about-me</link>
      <description>&lt;![CDATA[Pronouns: He/Him&#xA;&#xA;I am a zoomer capybara who loves computers and other living things. &#xA;Molecular Biology student at the Philipps University Marburg.&#xA;From Brazil, Living in Germany. &#xA;&#xA;Things is love to talk about: #biology #linux #selfhositing #smallWeb #plants #climate #science #literature #art&#xA;&#xA;I am still figuring out what exactly I want to cover in this blog, but expect any of these topics.&#xA;&#xA;Find me at:&#xA;Bookwyrm: @copybara@bookwyrm.social&#xA;Mastodon: @sotneStatue@fosstodon.org]]&gt;</description>
      <content:encoded><![CDATA[<p>Pronouns: He/Him</p>

<p>I am a zoomer capybara who loves computers and other living things.
Molecular Biology student at the Philipps University Marburg.
From Brazil, Living in Germany.</p>

<p>Things is love to talk about: <a href="https://plain-text.cc/tag:biology" class="hashtag"><span>#</span><span class="p-category">biology</span></a> <a href="https://plain-text.cc/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://plain-text.cc/tag:selfhositing" class="hashtag"><span>#</span><span class="p-category">selfhositing</span></a> <a href="https://plain-text.cc/tag:smallWeb" class="hashtag"><span>#</span><span class="p-category">smallWeb</span></a> <a href="https://plain-text.cc/tag:plants" class="hashtag"><span>#</span><span class="p-category">plants</span></a> <a href="https://plain-text.cc/tag:climate" class="hashtag"><span>#</span><span class="p-category">climate</span></a> <a href="https://plain-text.cc/tag:science" class="hashtag"><span>#</span><span class="p-category">science</span></a> <a href="https://plain-text.cc/tag:literature" class="hashtag"><span>#</span><span class="p-category">literature</span></a> <a href="https://plain-text.cc/tag:art" class="hashtag"><span>#</span><span class="p-category">art</span></a></p>

<p>I am still figuring out what exactly I want to cover in this blog, but expect any of these topics.</p>

<p>Find me at:
– Bookwyrm: <a href="https://plain-text.cc/@/copybara@bookwyrm.social" class="u-url mention">@<span>copybara@bookwyrm.social</span></a>
– Mastodon: <a href="https://plain-text.cc/@/sotneStatue@fosstodon.org" class="u-url mention">@<span>sotneStatue@fosstodon.org</span></a></p>
]]></content:encoded>
      <guid>https://plain-text.cc/about-me</guid>
      <pubDate>Thu, 20 Feb 2025 00:35:35 +0100</pubDate>
    </item>
    <item>
      <title>usb-copy.service: A plug and copy solution</title>
      <link>https://plain-text.cc/usb-copy-service-a-plug-and-copy-solution</link>
      <description>&lt;![CDATA[#linux #backup&#xA;&#xA;I often have to transfer files from other computers and work on them in my laptop. So I walk around with an USB stick in my key chain precisely for that. Having all my precious files at hand at all times is very useful, and the following systemd-service is what makes it possible.&#xA;&#xA;It does one very simple thing: detects when my USB stick is mounted, and runs rsync to copy all files to a folder in my /home directory. This tool has seen a few iterations, and at first it required an udev rule and a script. Now, this version the most simple and elegant I could come up with.&#xA;&#xA;To define which USB device should be copied, use the partition label. It can also be found using sudo systemctl list-units -t mount. In this case my usb is called run-media-USER-SANDISK.&#xA;&#xA;Create the systemd unit file at /etc/systemd/system/usb-copy.service&#xA;&#xA;[Unit]&#xA;Description=Backup USB contents&#xA;Requires=run-media-USER-SANDISK.mount&#xA;After=run-media-USER-SANDISK.mount&#xA;&#xA;[Service]&#xA;ExecStart=/usr/bin/rsync -a --delete /run/media/USER/SANDISK /home/USER/&#xA;&#xA;[Install]&#xA;WantedBy=run-media-USER-SANDISK.mount&#xA;&#xA;Reload the systemd-daemon with sudo systemctl daemon-reload&#xA;&#xA;This unit will silently run the command when the run-media-USER-SANDISK.mount unit appears.]]&gt;</description>
      <content:encoded><![CDATA[<p><a href="https://plain-text.cc/tag:linux" class="hashtag"><span>#</span><span class="p-category">linux</span></a> <a href="https://plain-text.cc/tag:backup" class="hashtag"><span>#</span><span class="p-category">backup</span></a></p>

<p>I often have to transfer files from other computers and work on them in my laptop. So I walk around with an USB stick in my key chain precisely for that. Having all my precious files at hand at all times is very useful, and the following systemd-service is what makes it possible.</p>

<p>It does one very simple thing: detects when my USB stick is mounted, and runs <code>rsync</code> to copy all files to a folder in my <code>/home</code> directory. This tool has seen a few iterations, and at first it required an <code>udev</code> rule and a script. Now, this version the most simple and elegant I could come up with.</p>

<p>To define which USB device should be copied, use the partition label. It can also be found using <code>sudo systemctl list-units -t mount</code>. In this case my usb is called <code>run-media-USER-SANDISK</code>.</p>

<p>Create the systemd unit file at <code>/etc/systemd/system/usb-copy.service</code></p>

<pre><code>[Unit]
Description=Backup USB contents
Requires=run-media-USER-SANDISK.mount
After=run-media-USER-SANDISK.mount

[Service]
ExecStart=/usr/bin/rsync -a --delete /run/media/USER/SANDISK /home/USER/

[Install]
WantedBy=run-media-USER-SANDISK.mount
</code></pre>

<p>Reload the systemd-daemon with <code>sudo systemctl daemon-reload</code></p>

<p>This unit will silently run the command when the <code>run-media-USER-SANDISK.mount</code> unit appears.</p>
]]></content:encoded>
      <guid>https://plain-text.cc/usb-copy-service-a-plug-and-copy-solution</guid>
      <pubDate>Sun, 16 Feb 2025 17:17:12 +0100</pubDate>
    </item>
  </channel>
</rss>