Log installed files

Gerard Beekmans gerard at linuxfromscratch.org
Sat Mar 16 09:51:54 PST 2002


On Sat, Mar 16, 2002 at 05:28:50PM +0000, Mark Binns wrote:
> How do you deal with files that have been copied preserving their older
> timestamps? And won't the -cnewer mean that it doesn't find files that

-cnewer will still work. Here's an example:

gerard at gwaihir:~$ touch a
gerard at gwaihir:~$ cp -a /bin/ls .
gerard at gwaihir:~$ find . -cnewer a
.
./ls

-cnewer looks at when the file's status was last changed. If this is more
recently than the modification time, then 'find' will print it.

Here perhaps a better example:
gerard at gwaihir:~$ touch -t 197001010101 b
gerard at gwaihir:~$ find . -cnewer a
.
./b

File 'b' timestamp is set to january 1st, 1970, 01:01 AM but it still
changed status a second after I created 'a' so it'll show up.

If you would use -newer instead of -cnewer than ./b won't show up because
with -newer find only looks at the modification time (ie: the time you see
with ls -l)

> have been modified or overwritten?

It will find files that have been modified or overwritten.

-- 
Gerard Beekmans
www.linuxfromscratch.org

-*- If Linux doesn't have the solution, you have the wrong problem -*-
-- 
Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-support' in the subject header of the message



More information about the lfs-support mailing list