git status - fatal: cannot chdir

tldr: If you make any changes to the file path of a git submodule, you need to also update all of your config files accordingly. Background I use the Papermod Hugo theme for my personal website. One of the ways to use Hugo themes is to install them as a submodule inside your project’s ./themes directory. I wanted to update the module today as there have been a number of changes since I set it up....

May 26, 2022 · 3 min · Me

Change your file permissions, baby!

Knowing how to set file permissions is very useful (for a much more thorough primer than I provied here, see this article). Unfortunately, while this is very easy to do, it is even easier to forget the codes used to do so. So here’s how you do it! The easiest (shortest) way to change permissions is using octal syntax. Octal syntax goes like this: chmod <owner><group><others> filename Where <owner>, <group> and <others> stand for the octal numeral pertaining to that user or group....

February 24, 2021 · 1 min · Me

Move and rename all files in a folder

I wanted to move and rename a bunch of excel files in a folder. This is one way to do it from the command line, copying into a directory in the parent folder. I did it this way to be able to rm -r old_folder after copying my files to the new folder. You could modify it to rename them in place, but I’ve accidentally rm -rfed enough things to get nervous doing it that way....

February 17, 2021 · 1 min · Me

Count files by type and directory

Using the command line to count stuff

December 17, 2020 · 5 min · Colin