Tail Vault auth logs

Problem

You would like to tail the Vault auth log files, but if you use the vault tag for auditing and your server is also named vault, you cannot filter out the vault auth logs only.

Solution

Use the client_login as the filter in grep:

Search for content in files in linux (recursively and case-independent)

Problem

You would like to find the files that contain some specific text, and would like to do it recursively (ie in a project folder), using something simpler than the find command.

Solution

You can use the following in your current top folder to search recursively, case-independent and by displaying the file number that the searched text appears, with the following:

Search for specific string in files/directories with line number in linux

Problem

You want to search in a directory or some files for a specific string and you also want to know the number in the file that the text is found.

Solution

Use grep with the -n for the line number and the -r for directory search as in the following: