Linux

which python

find

#-type f Hereby, we define the type of the searched object. In this case, 'f' stands for 'file'.

#-name .conf With '-name', we indicate the name of the file we are looking for. The asterisk () stands for 'all' files with the '.conf' extension.

#-user root This option filters all files whose owner is the root user.

#-size +20k We can then filter all the located files and specify that we only want to see the files that are larger than 20 KiB.

#-newermt 2020-03-03 With this option, we set the date. Only files newer than the specified date will be presented.

#-exec ls -al {} ; This option executes the specified command, using the curly brackets as placeholders for each result. The backslash escapes the next character from being interpreted by the shell because otherwise, the semicolon would terminate the command and not reach the redirection.

#2>/dev/null This is a STDERR redirection to the 'null device', which we will come back to in the next section. This redirection ensures that no errors are displayed in the terminal. This redirection must not be an option of the 'find' command.

#find / -type f -name *.conf -user root -size +20k -newermt 2020-03-03 -exec ls -al {} ; 2>/dev/null

Otro Comando