Categories
Linux Mastering Development

Writing a backup script that can deal with both files, absolute paths and relative paths

I am trying to write a backup script with a minimal number of commands. The backup script takes two inputs, the absolute OR relative path of destination where the the backup is to be made, and a an absolute OR relative path to the file or directory that needs to be copied. I am just […]

Categories
Linux Mastering Development

Running an s6 service on start-up in Artix Linux

I have installed docker on my machine, but I cannot figure out how to make the service run on startup. local/docker-s6 20200907-1 (s6-galaxy) s6 service scripts for docker On Arch Linux with systemd I would use systemctl enable –now docker What is the equivalent on s6 if there is one?

Categories
Linux Mastering Development

How to output comma separated values using IFS=”,” in shell

I have a small script, which does not give comma separated output when IFS is used, but IFS is mandatory as i need it to read many other value. The output of the below script is odi_server1 odi_server2, but I need it separated by comma. #Script Starts #!/bin/sh IFS="," odi_cluster=odi_server1,odi_server2; echo $odi_cluster; #Script Ends Current […]

Categories
Linux Mastering Development

Why are writes so slow on ext4?

I’m trying to work out why writing to ext4 partitions on my server is so slow. I noticed this issue when I reformatted my off-site backup drives from ExFAT to ext4. When these drives were formatted as ExFAT, I was seeing write speeds around 140-150MB/s. Now, with the same drives formatted at ext4, I’m seeing […]

Categories
Linux Mastering Development

SSD not recognized on Ubuntu though Windows sees it

I recently bought an Acer Nitro-5 and wanted to try Linux on it for the first time. I booted from a USB-Stick as usual, however the OS (Manjaro, Pop!, Ubuntu tried them all) did not recognize my SSD making installation impossible. I then proceeded to attempt to install windows on it, which then worked immediately. […]

Categories
Linux Mastering Development

Is it possible to pipe only on error? [closed]

If there is any error then 2>&1 and pipe (|) to another program, otherwise do not 2>&1 and do not pipe

Categories
Linux Mastering Development

Script called by another system doesn’t run correctly

I am trying to write some scripts for graceful shutdowns from my UPS. My UPS is hooked up to my freenas system. I also have a KVM server running KVM on Ubuntu 18.04, and that is where I’m having some issues. I have the following script on my freenas to call the shutdown script on […]

Categories
Mastering Development

I cant figure out a way of placing my body to have at least the full screen or more if there is content?

This probably seems like a repeat question (since I’ve seen 1000s of posts like this) but they all have the same answer: "make your html and body height to 100%/100vh!" well that doesn’t seem to work. I am really a newbie in css, but I know that a height of 100% should reference the parent, […]

Categories
Mastering Development

UDP broadcast over internet

Currently, I’m working on a project (WIFI based) in which there is a base station (Master) and N-devices (slave/ UDP Listener). In my application, the base station needs to broadcast a packet/ message every second for the N-devices to receive. So, for achieving this task, I’ve built a UDP network in the LAN, and I’m […]

Categories
Mastering Development

Flutter: Connectivity Widget Wrapper Provider error

I’ve added ConnectivityWrapperWidget with my custom offlineWidget. I’m getting this error, while running the app Error: Could not find the correct Provider above this ConnectivityWidgetWrapper Widget This likely happens because you used a BuildContext that does not include the provider of your choice. There are a few common scenarios: The provider you are trying to […]