first you need to declare a path and a path to access you just specify that, it will be searched for the /var/log path and then you enter your local log path where the log file resides and you will get access without any problem.
The second one is just like the first one you only pass the file name to be searched(in above example, it was with there was no need for search. The system will check all the folders in your system which contain “access’ file type and it was found there and the first time it gets it is not found you can give the next folder’s access file name to the above program to check if the file exists or not and if the file is not present, the log should be redirected to which in our case was so the output would be as which means i have successfully logged the info into file of system
three drives pattern
The third one is to look for inside the whole filesystem without searching by using getcwd() function. So when you open a new window, the current working directory of the OS will be stored at /tmp. This current working directory will be searched using this way. This will help the program locate the desired folder/file to access its log file. If we look a little bit deeper on this technique(the program will access the last_accessed key-value pair which holds location and access). On opening the program, when we enter command to find it will open in a new tab in case of having windows and will have its own terminal. If we enter directly into command prompt without switching to a tab or changing the current working directory, this system will make sure what current directory we are residing under the current working of the system. Because its accessing a system key/value pair which contains path and then it compares with the current working directory.
three drives pattern
so, in this way when someone wants to know information about the recent activity logs. The program also provides an API that helps to implement such functionality. This will come out some other day. I think you guys should definitely read this before jumping into a conversation related to the subject of log management.
Thanks for reading!!!