Skip to article frontmatterSkip to article content

Miscellaneous commands

Authors: Martina Contisciani1,2
Affiliations: 1Inverse Complexity Lab, 2Central European University
License: CC-BY

This document contains useful terminal commands for debugging and troubleshooting.

Making compilation output more readable

When we run make, we might get a lot of output, including warnings and errors. To make it easier to read, scroll through, and search, we can use this command:

make 2>&1 | less

The option 2>&1 combines the error messages with the regular output, while | less lets us scroll through everything interactively. This also allows us to search within the output — for example, for “error” or “warning”. Note that to jump to the next match, we need to press n.

A symbolic link (also symlink or soft link) is a type of file that acts as a pointer to another file or directory. To create a symbolic link, we can use this command:

ln -s <source> <target>

where <source> is the path of the file or directory on your computer that we want to link to, and <target> is the the name of the symbolic link we want to create. To remove a symlink, we can either use the unlink or rm command.