Urgent.News

What's breaking now, across thousands of outlets.

Tech

Suspend, Background, Disown

I'm currently working on a hobby project, using crawlers to download media files for a dataset. Some of these are large files that also need preprocessing. Instead of building a whole system to manage this, I'm just creating simple scripts to handle them one at a time. Given the volume of data I'm working with, I realized the scripts were going to take a long time to run on my mini-server. So, I…

Recently, while working on a hobby project involving media files, the writer encountered large files that needed preprocessing. To manage these files, the writer created simple scripts to handle them individually. As the data volume grew, the scripts began to take a long time to run on the writer's mini-server, leading to the need for background processes. Previously, the writer relied on nohup or tmux for this purpose. However, today, the writer remembered a trick they had recently learned.

To suspend a process that's already running, the writer presses CTRL + Z. After suspending the process, the writer can resume it in the background by typing bg and hitting enter. The script or command will then run in the background, confirmed by a message ending with an ampersand (&). The crucial part of this trick is disowning the process. To do this, the writer enters disown -h %1, where %1 represents the job number. By disowning the process, it becomes completely independent of the current shell session.

While nohup still serves its purpose, the writer finds this method advantageous, particularly when working on a server without tmux or permission to install it. The writer concludes that this method is particularly useful for simple tasks, especially in such server environments.

Written by urgent.news from Dev.to's reporting — not their text. Machine-written — may contain errors; check the original before relying on it.

Read the original at dev.to →

More in Tech

No measurement, no optimization

No measurement, no optimization. There's a common saying in programming: "Don't optimize what you haven't measured yet." You can only truly appreciate this advice when you experience it yourself.

  • Optimization should follow performance measurement
  • Database queries caused most performance issues
  • Combined queries had higher average response time

New Portfolio in the Works

New Portfolio in the Works. I’ve always wanted a cool, chibi-style profile picture for my portfolio, but I've never been good at drawing.

  • Designer created portfolio with Ghibli-style image generator.
  • Inspired by modern techy design, aiming for warmer aesthetic.
  • Focused on legibility and responsiveness across devices.

Uptime Kuma on Fedora with Podman Quadlet

Over the weekend, I decided to set up Uptime Kuma on my mini-server. I needed a quick way to monitor some important work services, and Uptime Kuma’s Slack notifications make it easy to get alerts…

  • Uptime Kuma installed on Fedora mini-server for service monitoring
  • Podman Quadlet used to manage containers with declarative files
  • SELinux permissions adjusted and systemd service enabled via Quadlet

Using fstab instead of autofs for a samba share

A few weeks ago, I borrowed a Raspberry Pi 4B from a friend. Since it wasn't going to be used for a while, I decided to set up a network storage for our home network.

  • Author used Samba for network storage on Fedora Server 38
  • Initial autofs and crypttab configuration failed due to race condition
  • Fstab permanently mounted drive, solved Samba access issue

More from Sunday 27 September →