home | list info | list archive | date index | thread index

Re: what is the (sysctl?) command to simply list the files being consulted?

On 2019-09-15 1:23 p.m., Robert P. J. Day wrote:
> On Sun, 15 Sep 2019, Robert P. J. Day wrote:
> 
>>
>>   i know from all the docs that you can set sysctl variables in a
>> variety of places, including /usr/lib/sysctl.d, /etc/sysctl.d and so
>> on ... what is the command to simply *display* the order of file
>> consultation without actually processing the files?
>>
>>   i could *swear* i found a command to do that a couple weeks ago, now
>> i've simply forgotten it. thoughts?
> 
>   i may have misremembered ... "sysctl --system" does show that
> information but also tries to apply all the settings it finds. i was
> after something just like that that did not actually process the
> files, just printed them out.
how about cheating a little
	sysctl -r "^-4711" --system
only apply the parameter named "-4711" (don't expect that to be a valid
parameter name) but still show the paths examined

an ugly way to do it - which I can't recommend, run it as a normal user
and ignore the errors
	su peters -c "/usr/sbin/sysctl --system" 2>/dev/null

/ps

Attachment: signature.asc
Description: OpenPGP digital signature