You are a newly appointed technician for company Inc. The company has Linux- based network.
You have executed a command find /home – user joe -group joe on the terminal. What will this
command do?
A.
It will search for files owned by the user joe -group joe anywhere on the system.
B.
It will backup files owned by the user joe -group joe in /home/.
C.
It will display the content of a file that belongs to group joe.
D.
It will search for files owned by the user joe -group joe in /home/.
Explanation:
When you will execute the command find /home -user joe -group joe on the terminal, it will search
for files owned by the user joe -group joe in /home/.
What is the find command?
The find command can perform a search based on a variety of search limitations. It searches
through one or more directory tree(s) of a filesystem, locating files based on some user-specified
criteria. By default, find returns all
files in the current
working directory. Further, find allows a user to specify an action to be taken on each matched file.
Thus, it is an extremely
powerful command for applying actions to many files.
The find command can be used with a wild card (*), but it works best when we know the name of
the file or directory we are looking for.
The find command can search your system for files that comply with certain numeric criteria, such
as the size of the file (- size), the number of links to the file (-links), the date of the last change to
the files data (-mtime), or the date of the last time the file was read (-atime). All these criteria
accept a numeric value. When a numeric value is provided to find, it looks for an exact match,
more than the number, or less than the number.