söndag 22 september 2019

Avoid configuration prompts when installing freebsd ports

When installing ports with many dependencies, repeatedly stopping the compilation to show a configuration prompt is annoying, especially if you want the default values. This can be avoided in a couple of ways.

When installing a port, adding either of these batch flag uses default.
make install BATCH=YES
make install -DBATCH

The batch flag can also be set as an environment variable.
export BATCH=yes

What if you want to configure everything first and then compile?
make config-recursive
Remember that this command needs to be run many times until all configuration has been performed.

Sources:
1 unix.stackexchange.com
2 unix.stackexchange.com

Get octal permissions for files.

Sometimes it would be nice to read the permissions in octal, not only set it in octal.
This can be done using the stat tool.

This command will list all files/folders and their octal permission.
stat -c "%a %n" *

-c is for specifying the display format.
%a is the octal permission and %n is the file name.

Source: AskUbuntu.com