Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How does the "-newer $file" option of "find" command in linux shell work?

I have following linux command.

find ${MOUNT_POINT} -type f -name "VM*" -newer $SENTFILE -print0 | xargs -0 -i cp {} ${TMP_DIR}

I am having difficulty understanding the option -newer $SENTFILE. Could anybody explain this option?

like image 554
Kyaw Zin Htoo Naing Avatar asked Oct 31 '25 09:10

Kyaw Zin Htoo Naing


1 Answers

From man find:

-newer file
    File  was  modified  more recently than file.  If file is a sym‐
    bolic link and the -H option or the -L option is in effect,  the
    modification time of the file it points to is always used.
like image 200
pfnuesel Avatar answered Nov 02 '25 23:11

pfnuesel