![Where to download naruto shippuden](https://cdn3.cdnme.se/5447227/9-3/screenshot_3_64e629479606ee7f889a24a8.jpg)
![using grep command to search files using grep command to search files](https://i1.wp.com/allthings.how/wp-content/uploads/2020/02/Using-Grep-Linux.jpg)
![using grep command to search files using grep command to search files](https://net2.com/wp-content/uploads/2019/10/word-image-22-1024x677.jpeg)
![using grep command to search files using grep command to search files](https://www.skillsugar.com/media/image/grep-command-1592576858.png)
Using the grep command and the xargs commandįirst, we examine the log files’ content to find the files to move.Using the grep command and a while loop.Today, we’ll address three approaches to achieve that: So, our requirement is to find those log files containing “ security alert” entries and move them to a new directory in one single command. Also, some log files are case-insensitively containing “ security alert” logs. These log files are lying in different directories. Īs we can see in the output above, we have four log files for two applications – app1 and app2. 22:08:14 security alert: 10 times failed login from the same IP. => logs/app1/app1.log logs/app1/app1_user.log logs/app2/app2.log logs/app2/app2_user.log <= Let’s first have a look at some log files under the logs directory: $ head logs/**/*.log Usually, an example can explain a problem quickly.
![Where to download naruto shippuden](https://cdn3.cdnme.se/5447227/9-3/screenshot_3_64e629479606ee7f889a24a8.jpg)