Category: linux

FOSS, linux, rust, shell

Analize disk usage with dutree

dutree is a command line tool to analyze disk usage. Features coloured output, according to the LS_COLORS  environment variable. display the file system tree ability to aggregate small files ability to exclude files or directories ability to compare different directories fast, written in Rust This tool is a mix between tree and durep, which we already …

btrfs, linux, shell

Easy sync BTRFS snapshots with btrfs-sync

To complement the last BTRFS tool btrfs-snp (which allows us to schedule snapshots), I would like to share a new tool to synchronize them locally or remotely  to achieve efficient data redundancy. With btrfs-snp we can replicate our BTRFS snapshots in a different BTRFS system, and have a second copy of our versioned subvolume in …

ARM, linux, shell

Safely flash SD card images with ddsd

I would like to share another wrapper based on the pv command ( because we love progress bars!! ). As part of my work in NextCloudPi, I am constantly copying images to an SD card to test the latest build. The classic Linux way of doing this is by using the dd command

We …

btrfs, linux, shell

Schedule BTRFS snapshots with btrfs-snp

To complement the last BTRFS tool btrfs-du, I would like to share a simple script for creating BTRFS snapshots that plays well with cron and systemd timers. This allows us to easily automate snapshot creation. I was inspired by btrfs-snap by Birger Monsen. Usage btrfs-snp can be run manually, or summoned from cron. Invoke without …

btrfs, linux, shell

Check disk space of your BTRFS snapshots with btrfs-du

Today I want to share a simple way to check the state of our BTRFS snapshots. Usage

If path is omitted, it will default to / . We can list easily our snapshots, plus have a clear view of how much data they have in common and how much total overhead are we holding. …

ARM, debian, docker, linux

Building Armbian images faster using Docker

The people at the Armbian team have been doing an impressive work at optimizing and generating Debian images for many ARM boards. While they have documentation on the build process, it focuses mostly on setting up a build environment on VirtualBox with Vagrant. They do support building in a Docker environment, but I found the …

FOSS, linux, security

Sandbox your applications with Firejail

One thing I that like about the Android App security model is that for a given app, it presents the permissions to the user and the user has to accept them. This is good because the user has control over the software it runs, and is an invaluable tool to be able to use an …

linux

Save and restore your Arch Linux packages

Lately, I have been reinstalling Arch from scratch on several machines. When doing so, it is very handy to replicate your packages and that is actually very easy to do with Arch Linux. Create a package list The following command creates a list with your packages, that you can curate and store under private versioning …

C, debian, docker, linux

Debian build environment in a docker container

Last post, I shared a docker container for compilation in C with ccache and colorgcc included. This time, we will extend that base container for development and packaging of Debian packages. Not only it is handy to have the environment configured and packaged, but also opens some oportunities for optimization given the nature of docker, …