Pi-Eyed and Clueless – Adventures with Board and Flash Drive

Since setting up my Raspberry Pi as a Plex Media Server a few years ago, the reliable application of Moore’s Law has brought us to a point where a humble USB flash drive now has sufficient capacity to cope with all of my media files and then some.
Therefore, I felt it was probably time to retire the powered external HDD that had been doing service as storage and replace it with a nice, compact stick.

Existing Setup
…to new setup in 3 easy steps ( and several hard ones)

The Pi in question is a Pi3 and is running Raspbian 11 (Bullseye).
The main consideration here was that I wanted to ensure that the new storage was visible to Plex from the same location as before so that I didn’t have to go through the rigmarole of validating and correcting all of the metadata that Plex retrieves for each media file ( Movie details etc).

Having copied the relevant files from the HDD to the new Flash Drive, I was ready to perform this “simple” admin task.
The steps to accomplish this are set out below.

Also detailed are some of the issues I ran into and how I managed to solve them, just in case you’ve stumbled across this post in a desparate search for a solution to your beloved fruit-based computer having turned into a slice of Brick Pi. In fact, let’s start with…

Continue reading “Pi-Eyed and Clueless – Adventures with Board and Flash Drive”

Installing a Gnome Desktop Extension in Ubuntu

To distract myself from England’s ongoing woes at the Cricket World Cup, I’ve been playing the simple-yet-addictive London Tube Map Memory Game .
Having not taken the tube for a few years now, it’s proving something of a challenge.
It doesn’t help that they’ve added quite a few stations recently.
Another test of my memory occurs on those rare occasions where I want to terminate a frozen window on my Gnome desktop.
There’s an excellent utility called xkill which does the job…and which I can never remember the name of !
Fortunately there is a Gnome Shell Extension which will add an icon to the gnome-panel at the top of the screen so
it’s only a mouse-click away…

Continue reading “Installing a Gnome Desktop Extension in Ubuntu”

Loading data into Oracle directly from compressed or enrcypted files

Whilst it’s not uncommon to transfer data between systems by means of text files, the files themselves often turn-up in a binary format.
They may have been compressed or even encrypted before transit.
Turning them back into text so that they can be processed may be a bit of an overhead.
Not only can you end up with two copies of the data ( the binary original and the re-constituted text version), the process of conversion may be both time consuming and resource intensive.
In the case of encrypted files, persisting the unencrypted data in a file may have additional security implications.
Fortunately, it’s possible to load data from such binary formatted files into Oracle without first having to write it to a text file.

Irrespective of whether your incoming feed file is enrcypted or merely compressed, loading it into Oracle should be effortless for you after reading this.
You need not worry about any potential pitfalls because I’ve already fallen into each pit in turn, as I shall now recount.

To start with, I’ll be looking at how to use an External Table Preprocessor to load data from a compressed file.
I’ll then go through loading data that’s GPG encrypted.

Following that, we’ll take a look at why PDB_OS_CREDENTIAL might not be the help you hoped it might be when dealing with GPG decryption and how SQL*Loader can help.

Whilst I was writing this, Oracle considerately released 23c Free and made it available in a VirtualBox appliance running Oracle Linux Server 8.7, so it’d be rude not to use it for the examples that follow…

Continue reading “Loading data into Oracle directly from compressed or enrcypted files”

Linux – Checking that two files contain the same data but in a different order – Sorted!

Trying to regression test a change to a feed-file generation program can be tricky. Whether the format is CSV or some fashionable markup language, the ordering of the result set tends to be unimportant in such circumstances.
When testing, we need to verify that the files produced by the new version of the program contain the same data as those produced by the old version, irrespective of the order in which the records are written.

Recently, I was rescued from my struggle with just such a problem by my colleague, Don Thomson, who imparted some (Linux) Jedi wisdom resulting in a simple yet effective solution, involving an inventive combination of Linux utilities.

What we’re going to look at here is :

  • comparing files with diff
  • using sort to give diff a hand
  • comparing sets of files in different directories using sum
  • ignoring trailer records in delimited files using grep or head
Continue reading “Linux – Checking that two files contain the same data but in a different order – Sorted!”

Using an Access Control List to set default permission for new files in a directory on Linux

Today’s “I’ve finally figured out how to do this” instalment is all about Linux file permissions.
In this case, it’s how to ensure that files in a given directory are created with a default group and set of permissions.
The idea is that any files created in a given directory are readable by members of a specific group.

Teddy will be joining me for this Linux adventure. Lately he’s started to wonder if there’s much future in the Boris-Johnson-Lookalike business and so he’s looking to diversify…

“Any chance I can ambush that cake ?”
Continue reading “Using an Access Control List to set default permission for new files in a directory on Linux”

Furry File Finagling in Linux

The UK this week, it’s been all about The Queen. Being a cat, Cleo naturally assumes that the Queen in question is her.

Cleo’s interest in what follows is less lending a helping paw and more being curious as to what her minions are up to. That and the fact that she’ll do anything to get her paws on the cat treat known as Dreamies.

Mind you, she does have something of a technical background :

Sat on the Mat is such a cliche !

From my perspective, today’s “that’s handy, I really must write that down” instalment covers some useful Linux commands for managing files, together with some surprising date formats.

What was that Your Majesty ? Carry On, Cleo ?

Continue reading “Furry File Finagling in Linux”

Pretty Vagrant – the easiest way to get Oracle XE21c running on Ubuntu

Just for once, I’d like to have an Oracle database installed on my laptop by an expert.
I wonder if that nice @GeraldVenzl would help out ?

It’s been a few months now since the latest version of Oracle’s excellent ( and free) Express Edition (XE) database was released and it’s about time I got it installed and running so I can have a play.

Fortunately, due to a bit of DevOps sorcery called Vagrant, getting my hands on Gerald Venzl’s latest effort is easier than ever.

What I’m going to cover here is :

  • an overview of the tools we need
  • installing Vagrant on Ubuntu
  • cloning the Oracle vagrant-projects Github Repo
  • installing Oracle 21c XE using Vagrant
  • some useful vagrant commands
Continue reading “Pretty Vagrant – the easiest way to get Oracle XE21c running on Ubuntu”

Upgrading Plex Media Server on a Raspberry Pi

I’m running Plex on my RaspberryPi so that I can stream my movies to multiple devices on my home network.
The periodic upgrades to the Plex software can get a bit fiddly.
Therefore, to save me looking up how to do the same things every time I need to upgrade, I thought I’d put them in one place…

Continue reading “Upgrading Plex Media Server on a Raspberry Pi”

Defaulting Argument Values in a BASH script

I recently found out (again) how to default argument values in a shell script, so I thought I’d write it down this time.
The ABBA flavour in what follows is because we’re talking about BASH – the Bourne Again SHell and Bjorn Again are an ABBA tribute band. This is quite handy because the ABBA back catalogue is rather versatile having already lent itself to an explanation Oracle password complexity.

Welcome to the inside of my head. Sorry about the mess…

Continue reading “Defaulting Argument Values in a BASH script”