Posts

Showing posts with the label find

LPI E - locate set test

Linux Search Showdown: Conquer the Practice Exam Challenge! Ready, [set], locate! LPI E 2.2 Question 1: Which utility program can be used to perform a search based on a previously constructed database of files and directories on a Linux system? A) ls B) find C) locate D) grep /* --------------------- */ -------------------------- Answer 1 Below:  -------------------------- /* --------------------- */ Explanation: The locate utility program performs a search using a pre-built database of files and directories on a Linux system. It matches entries that contain a specified character string, providing a list of relevant results. The other options, ls, find, and grep, do not rely on a pre-built database for searching files and directories. Answer 1: C) locate Question 2: How can you obtain a shorter and more relevant list of files and directories when using the locate command? A) By using the -l option B) By using the -r option C) By using the -s option D) By piping locate output to g...

find secrets

Image
LPI E - Scripting 4.3 Where Data is Stored Finding The Data Here are just a few examples of the many parameters and switches that can be used with the " find " command to locate configuration files for Linux programs and binaries.   By understanding these basic parameters, a Linux learner can begin to effectively search for files and directories using the terminal.  👇👽💦 This command searches the "/etc" directory and all its subdirectories for files with the ".conf" extension. $ find /etc -name "*.conf" This will search for the file named "nginx.conf" starting in the "/etc/" directory. $ find /etc/ -name nginx.conf ... to find the configuration files for the Apache web server, you can use the following command $ find /etc -name "apache*" This command searches the "/usr" directory and all its subdirectories for files of type "f" (regular file) with the ".txt" extension...

LPI E - System Data

LPI E - Scripting 4.3 Where Data is Stored Review of Topics: Various types of information stored on a Linux system Part 1 of 2:  Part 2 - A Extensive Look Programs Configuration Processes Memory addresses System messaging Logging  Using the tools ps top free syslog - Debian or Fedora dmesg - Debian or Fedora and by locating information from directories like  "/etc/" "/bin" "/var/log/" Debian or Fedora "/boot/" "/proc/" "/dev/" "/sys/" I'll also provide a reference to some other tools at the end Finding information about Linux Programs and Configuration : Programs in Linux are typically stored in directories like "/bin/" "/sbin/" "/usr/bin/" "/usr/sbin/ "bin" meaning the executable binaries   To locate information about a program , you can use the " which " command followed by the name of the program $ which ls T his will display the full path to the program...