Managing tasks in Linux might initially seem challenging due to several factors inherent to the operating system's design and philosophy. While Linux offers incredible power and flexibility, its unique characteristics can contribute to a perception of complexity for newcomers:
- Command Line Emphasis: Linux relies heavily on the command line for system management. While this offers powerful control, it can be intimidating for those more accustomed to graphical interfaces;
- Learning Curve: The command line interface requires learning specific commands, options, and syntax. This learning curve can deter users who are not familiar with these commands;
- Diverse Distribution Landscape: Linux comes in various distributions (distros), each with its package management, configuration files, and software repositories. This diversity can lead to confusion when switching between distros;
- Manual Configuration: Many tasks in Linux require manual configuration through text files. While this offers fine-tuned control, it can be overwhelming for those used to automated settings;
- Dependency Management: Installing software sometimes involves resolving dependencies, which are other packages required for the software to work. This can be complex, especially for complex applications.
However, it's important to note that the perceived difficulty of Linux management diminishes as users become familiar with the system. Many resources, tutorials, and communities are available to help users learn and navigate Linux effectively. Additionally, the command line offers efficiency and precision once commands are learned. While Linux might seem challenging initially, it becomes highly rewarding as users gain confidence and experience in managing the system. Also for more simplicity manage there is utilities for find needed data by command!
- Root rights;
- Debian 11 or higher version;
- Several knowledge about work OS ;
- Internet connection.
First of all we need to update all packages in the system and install them:
apt update && apt upgrade -y
For our purpose we will use grep utility that can help scale up broad and range of our option. For search needed information we will use various of attributes. By the default we already have that utilities in our repositories or installed in our operating system, check by typing commands below:
If you will see options for command then you have installed there before, now we can use utility grep in single way. For that type command below:
grep -r "tt" /etc
The system will search through the /etc directory and its subdirectories for occurrences of the string "tt" in any files. If any matches are found, the corresponding lines containing the "tt" pattern will be displayed in the terminal as output.
Please note that searching through system directories like /etc might require administrative privileges, so you might need to use the command with elevated permissions (using sudo) depending on your system configuration.
grep -v "tt" /root/sometextfile.txt
In that combination of options we match whole words only, / meaning root directory and -name have sense looking for format and name. Also we can use invert request, just type -v option for searching all content exclude pattern and option -l displayed the names of files which contains the pattern:
grep -w -r "tt" /
We can use that while we searching amount file of content apt list for example:
apt list | grep nginx
In our case sign | means pipe or operator that give output from first to the second command as argument:
As the result we can see file with mentions nginx in the header of files or if we use option with exact match of searching word:
apt list | grep -w nginx
Linux provides many different utilities for working with system modules, one of which we have reviewed in this article. Using the syntax and the above options, you will be able to search for and more efficiently perform the tasks assigned to you when working with files.