HPE GreenLake Administration
- Community Home
- >
- Servers and Operating Systems
- >
- Legacy
- >
- Operating System - Tru64 Unix
- >
- Re: cp files based on newer date
Operating System - Tru64 Unix
1828770
Members
2814
Online
109985
Solutions
Forums
Categories
Company
Local Language
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
back
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Go to solution
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2005 03:34 AM
06-09-2005 03:34 AM
I have multiple Tru64 v5.1a servers and over the years have developed numerous shell scripts. To make a long explanation short, I sometimes lose track of which server has the latest version of a script and have copied over the newer version with an older version.
What I'm looking for is a way to write another script that will only copy (overwrite) the destination file if the file date of the source is newer. I don't see where the Tru64 cp command has this capability and I also don't see a practical way to compare the file dates of source and destination to determine if the cp command should proceed.
What I'm looking for is a way to write another script that will only copy (overwrite) the destination file if the file date of the source is newer. I don't see where the Tru64 cp command has this capability and I also don't see a practical way to compare the file dates of source and destination to determine if the cp command should proceed.
Solved! Go to Solution.
2 REPLIES 2
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-09-2005 08:30 AM
06-09-2005 08:30 AM
Solution
Tru64 comes with a tool called "nrdist" (New rdist). You create a config file, indicate one or more lists of hosts, one or more lists of files, and commands to distribute the files to the hosts.
nrdist only works with nrdist on the other hosts. If the other hosts aren't Tru64 (like, Solaris, for example), there's also "rdist". It's similar, but with a few less features.
Set up the config file, try it out, then put in a crontab entry to run nightly.
They both work great; we use them every night.
nrdist only works with nrdist on the other hosts. If the other hosts aren't Tru64 (like, Solaris, for example), there's also "rdist". It's similar, but with a few less features.
Set up the config file, try it out, then put in a crontab entry to run nightly.
They both work great; we use them every night.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-13-2005 01:26 AM
06-13-2005 01:26 AM
Re: cp files based on newer date
Sometimes I use the find command to solve similar problems:
From find(1):
-newer file
TRUE if the current file was modified more recently than the file indicated by file.
Or... Is it a problem if you just overwrite the script with the latest version say every day, just to make sure that you have the latest?
-Ross
From find(1):
-newer file
TRUE if the current file was modified more recently than the file indicated by file.
Or... Is it a problem if you just overwrite the script with the latest version say every day, just to make sure that you have the latest?
-Ross
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
Company
Events and news
Customer resources
© Copyright 2025 Hewlett Packard Enterprise Development LP