2

I am programming in shell scripting, and would like to log results.

Is there any way to know what is the default path storage for logfiles in my operating system? I have researched:

set | grep "log" -i

but there is nothing that seems to be like a log path directory.

1 Answer 1

3

For any system that follows the Filesystem Hierarchy Standard this should be /var/log. I think this is safe to assume for most modern systems.

Note that this is for system processes (ie daemons etc), for user processes the common thing to do is just to create the log file as a hidden file in the user's home directory. Eg ~/.myscript.log

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .