Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Scripting Question
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  3 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ToZ  
View profile  
 More options Jul 22 2001, 9:58 pm
Newsgroups: comp.os.linux.misc
From: T...@ToZ.com (ToZ)
Date: Mon, 23 Jul 2001 01:58:16 GMT
Local: Sun, Jul 22 2001 9:58 pm
Subject: Scripting Question
When I type at the prompt:

        find /data -mtime -10 -print

I get an accurate listing of all files that were modified
in the last 10 days. But when i type something like...

        cp -auv `find /data -mtime -10 -print` /backup

All of my files get copied over (even those last accessed

> 10 days ago). What am I missing?

I'm using stock RedHat 7.1 with all the latest update incl.
2.4.3-12 kernel.

TIA


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Dances With Crows  
View profile  
 More options Jul 22 2001, 10:14 pm
Newsgroups: comp.os.linux.misc
From: danceswithcr...@usa.net (Dances With Crows)
Date: 23 Jul 2001 02:14:04 GMT
Local: Sun, Jul 22 2001 10:14 pm
Subject: Re: Scripting Question
On Mon, 23 Jul 2001 01:58:16 GMT, ToZ staggered into the Black Sun and
said:

>When I type at the prompt:
>    find /data -mtime -10 -print

>I get an accurate listing of all files that were modified
>in the last 10 days. But when i type something like...

>    cp -auv `find /data -mtime -10 -print` /backup

>All of my files get copied over (even those last accessed
> 10 days ago). What am I missing?

find ~/crud -mtime -10 -print
~/crud
~/crud/file_modified_today
~/crud/file_modified_yesterday
[...]

The ~/crud directory shows up because it has been modified within the
last 10 days.  You could pipe the output of the find through grep -v
"/data", or you could add "-type f" if you don't have empty directories
to back up, or you could do a couple of other things.

--
Matt G|There is no Darkness in Eternity/But only Light too dim for us to see
Brainbench MVP for Linux Admin /     That which does not kill us
http://www.brainbench.com     /      makes us stranger.
-----------------------------/       --Trevor Goodchild, "AEon Flux"


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
John W. Krahn  
View profile  
 More options Jul 22 2001, 11:26 pm
Newsgroups: comp.os.linux.misc
From: "John W. Krahn" <kra...@acm.org>
Date: Mon, 23 Jul 2001 03:24:40 GMT
Local: Sun, Jul 22 2001 11:24 pm
Subject: Re: Scripting Question

man cp
[snip]
       -a, --archive
              same as -dpR
                         ^
The recursive flag is grabbing every file in /data's subdirectories.

cp -dpuv `find /data -mtime -10 -print` /backup
# OR
find /data -mtime -10 -exec cp -dpuv {} /backup

John
--
use Perl;
program
fulfillment


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »