Solved Confirm queries without asking

Hello everybody,

I know it from Linux, that with the parameter "-y" all queries are affirmed in case of eg an installation over the "apt install". Is this synonymous with FreeBSD? If yes, how do i do that?

Thanks
 
You can use the -y option with pkg(8) as you did with in Linux.
If you get tired of typing -y you can make pkg assume you always answer yes by adding (or uncomment) this line
Code:
ASSUME_ALWAYS_YES = true;
to your /usr/local/etc/pkg.conf.

Any pkg.conf settings are also usuable as env variables - they override everything in the configuration file.
 
You can use the -y option with pkg(8) as you did with in Linux.

Am i to stupid for this...?!

pkg install nano -y
Updating FreeBSD repository catalogue...
FreeBSD repository is up to date.
All repositories are up to date.
pkg: No packages available to install matching '-y' have been found in the repositories

It seems like that pkg thinks that "-y" is an furthermore package i like to install.
 
No, you're not too stupid. ;) People coming from Linux to FreeBSD (or other UNIX derivatives) often make this mistake.

Traditionally, options for UNIX commands have to precede the other arguments. So, ls -l /tmp works, but ls /tmp -l doesn't.

However, the GNU tools (used by Linux) have deviated from that tradition by allowing options anywhere (well, almost anywhere) on the command line, so ls /tmp -l works on Linux. I don't know why GNU made that design decision, but I think it was a mistake, because it can cause confusion and create subtle bugs in scripts (apart from the fact that this behavior is non-portable and not covered by the POSIX standards). One particularly evil example is the find(1) command.
 
However, the GNU tools (used by Linux) have deviated from that tradition by allowing options anywhere (well, almost anywhere) on the command line, so ls /tmp -l works on Linux.

Good to know. Never used this when I was on Linux and never will do.
 
Back
Top