- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Linux cp -u
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Forums
Discussions
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
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- 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
10-31-2005 11:54 PM
10-31-2005 11:54 PM
cp -u on linux means copy only when the SOURCE file is newer than the destination file, and there isn't such option on HP-UX.
I there a solution such as a third party cp or anything else?
10x
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 12:20 AM
11-01-2005 12:20 AM
Re: Linux cp -u
hpux cp command doensnt have the -u option.
You have to take help of script to do that, you can use find command, with mtime ctime to do that.
cheers,
Raj.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 12:28 AM
11-01-2005 12:28 AM
Re: Linux cp -u
Something like:
if [ sourcefile -nt destfile ]
then
cp sourcefile destfile
fi
should do the job.
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 12:32 AM
11-01-2005 12:32 AM
Re: Linux cp -u
file1 -nt file2 True if file1 exists and is newer than file2.
file1 -ot file2 True if file1 exists and is older than file2.
hth
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 01:18 AM
11-01-2005 01:18 AM
Re: Linux cp -u
Regards,
Sergejs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 08:06 PM
11-01-2005 08:06 PM
Re: Linux cp -u
It depends on how the files to be copied are currently specified exactly what you'll need to do.
e.g., assuming you want to copy all the files below a certain directory:
cd
find . -depth -print | cpio -pdma
Andrew
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 09:11 PM
11-01-2005 09:11 PM
Solutionhttp://hpux.connect.org.uk/hppd/hpux/Gnu/coreutils-5.2.1/
-Arun
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-01-2005 10:32 PM
11-01-2005 10:32 PM
Re: Linux cp -u
The script solutions are quite wise, however the coreutils is the best solution for me.
10x
Liad