This is a short guide to the commands that you can use to view, change, or create a log (a file), and is just a short introduction to the linux command who.
The new command who is the latest addition to the linux command line tool set. It’s a simple command that makes it easy to view or change text files in the same way you usually do with the Linux terminal.
who is a very simple tool that allows you to view or change any text file. What happens is that you type in a file’s name, and it will create a file named that file in the current directory. It can also open a file you’ve created, just like you would with the ls command.
That’s cool, but it’s a little bit overkill for what you want to do here. We want to search for all files that have the word who in their name. So you would type who, and it will search the entire directory for that word. It doesn’t seem like there’s a lot of power that can be gained from that one command.
You could have simply just searched for a word that is in the name of the file you want. But what if you wanted to search for a file that doesnt even exist? Lets say you wanted to search for a file that is named as a command and not as the name of a file. So you would type who. If that file doesnt exist, it will search the entire directory for the word that is in the name of your file.
The problem here is that you can create a file named who and then delete that file. You will have to make a copy of that file or find a way to delete the original file and then make a new directory to hold the copy.
We can solve this problem by using the search command. But if you want to search for the name of a file with an extension that doesnt exist, your best bet is to use find instead of search. Because if you use search to search for a file, it will find the name of the file, but if you use find to search for the name of a file with an extension that doesnt exist, it will find no matches.
The idea is to create a new directory, and then create a new entry in the.bash_history file in the directory. This way the user will be prompted to enter the name of the file and then will be able to use the search command again.
We recently looked at the bash history file and found that it only stores unique entries, so the command who does not exist will not be found. We looked at the find command to look for the file named who, but it only searches the current directory. So the best option is to replace the find command with the search command, giving your users the ability to search for who again without having to type the name of the file they want to search for again.
It still might take some time for users to remember how to use the search command, but in the meantime, you should be able to use the find command without too much effort.