Age of git tracked file II

Goal

Identify the last time an arbitrary line (let's say line 1) was changed for every file in the repository.

Step 1

Try and use blame to identify changes to the first line only:

$ git blame -L 1,1 -- README
^193d722 (Paul Schwendenman 2012-07-23 16:51:03 +0200 1) ======================

Grab …

more ...

Age of git tracked file

Goal

I use a password store named pass. Pass is a command line based manager that attempts to follow the Unix philosophy (roughly tools should do one thing and do it well.) I wanted to know when the last time I updated each password in my store, so that I …

more ...

Getting a random file from a directory

I had a massive directory of files that I wanted to pick a few random files to test before I imported the whole set. For this post lets say I want 100 random files from some_dir and moving them to this_dir.

First you could use:

$ LIST=$(ls -1 ./some_dir | sort …
more ...

LVM resize

My root partition recently ran out of space and I needed to resize it.

So I booted into a live usb and then, after activating my volume groups:

$ sudo vgchange -a y

I looked up lvm resize online and came up with the command:

$ sudo lvextend -L+10G /dev/mapper …
more ...