Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

HPUX

Posted on 2011-03-19
6
Medium Priority
?
556 Views
Last Modified: 2012-05-11
i need to copy an entire directory to a nfs share - then I would like to copy only the changed filed to the nfs share. to copy only the changed files - so far i have this

find / -type f -xdev -mtime -1 -print | xargs ll | sort -rn -k5

I was wondering if it would work to pipe this find's output into a file - then somehow use the file to use the rcp command to copy only the changed files to my nfs share, would this be possible?
0
Comment
Question by:JeffBeall
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
  • 2
6 Comments
 
LVL 38

Expert Comment

by:yuzh
ID: 35174944
FYI, you don't need to use "| xargs ll | sort -rn -k5"

you can direct the output of the find command to a file for later use.

eg:
find / -type f -xdev -mtime -1 -print >/tmp/myfilelist

and create a tar ball for the files in the list
tar -cvf /tmp/mtfile.tar `cat /tmp/myfilelist`

to make backup and restore easier, you should use related path to create the list.
eg
cd /
find . -type f -xdev -mtime -1 -print >/tmp/myfilelist

you can also use find + cp to copy files in one go, pleae look at the example
in http:Q_22575711.html

for more details.
Have a nice weekend!
0
 
LVL 40

Expert Comment

by:jlevie
ID: 35175669
There's a better way. Use rync to copy the changed files. As an example if /mnt/target is the nfs mount point and /home/files is the directory to be mirrored to the nfs mount point, the following command will sync the two directories:

rsync -av --delete /home/files/ /mnt/nfs

See "man rsync" for more information.
0
 
LVL 1

Author Comment

by:JeffBeall
ID: 35177056
I don't have rsyn. It is not in HPUX which is what my server runs.
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 40

Accepted Solution

by:
jlevie earned 1000 total points
ID: 35177309
Download the sources from http://rsync.samba.org/download.html and build & install it.
0
 
LVL 38

Assisted Solution

by:yuzh
yuzh earned 1000 total points
ID: 35177585
agreed with jlevie, rsync is a better tool for backup.

You can downlaod the binary package for HP-UX from:
http://hpux.connect.org.uk/hppd/hpux/Networking/Admin/rsync-3.0.7/

Please remember to download and install all the dependencies packages. (just follow the links in the download page).
0
 
LVL 1

Author Closing Comment

by:JeffBeall
ID: 35180632
thank you
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have been running these systems for a few years now and I am just very happy with them.   I just wanted to share the manual that I have created for upgrades and other things.  Oooh yes! FreeBSD makes me happy (as a server), no maintenance and I al…
1. Introduction As many people are interested in Linux but not as many are interested or knowledgeable (enough) to install Linux on their system, here is a safe way to try out Linux on your existing (Windows) system. The idea is that you insta…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
Suggested Courses

715 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question