way to copy only changed files


 
Thread Tools Search this Thread
Operating Systems AIX way to copy only changed files
# 1  
Old 12-13-2006
way to copy only changed files

Hello, we are going through a restructoring of file systems and will need to copy the contents of one file system to another box, then a few days later copy it again. Is there a way on the second copy to only copy files that have changed? Thanks in advance
# 2  
Old 12-13-2006
rsync may suit your needs.

Last edited by cbkihong; 12-13-2006 at 11:35 PM..
# 3  
Old 12-14-2006
either rsync as mentioned or the find-command with the "-mtime" clause. man find for details.

bakunin
# 4  
Old 12-15-2006
cd /sourcedir;
find . -xdev -depth -print | cpio -pdm /destin_dir

# After some days ,

cd /sourcedir;
find . -xdev -depth -print | cpio -pdm /destin_dir

The second copy will copy only those files which were changed / created from the earlier copy made.

Regards,

Kaps
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Compare files to pull changed records only

Hi, I am using Sun Solaris - SunOS. I have two fixed width files shown below. I am trying to find the changes in the records in the Newfile.txt for the records where the key column matches. The first column is a key column (example: A123). If there are any new or deletion of records in the... (4 Replies)
Discussion started by: Saanvi1
4 Replies

2. Web Development

When VPS IP is changed which web files to edit?

Hello, please when an VPS IP is changed which files on VPS i need to edit? I mean basic apache, named files, which needs to be edited? so far i listen its /var/named and domain zone file which contains old ip.. (2 Replies)
Discussion started by: postcd
2 Replies

3. UNIX for Dummies Questions & Answers

Copy and modify a file if the original has changed

Hi there, I have built up my own little "cloud" for my family as the amount of computers grows all day. By now we use 3 smartphones, 2 notebooks und 4 PCs, so this "home cloud" was made to store all personal data (photos, documents,...) and do a backup once in a while. It is running on a Ubuntu... (1 Reply)
Discussion started by: SebSnake
1 Replies

4. UNIX for Dummies Questions & Answers

Find only files that changed Yesterday

Hi , I know that find / -type f -mtime -1 will show all modified files that changed 24hrs preceeding the time i run the command. This will include list of files that changed today. How do i find only files that changed yesterday staring from 00:00hrs to 23:59? Thanks HG (2 Replies)
Discussion started by: Hari_Ganesh
2 Replies

5. Shell Programming and Scripting

how to get list of files changed by sed while replacing

Hi We have a shell script to find a string in a large set of files and replace it using the sed command.in the same time we also want to store the list of files it checked. *** The existing script is as below #!/bin/bash #1 _r1="inst_group=ems7770" _r2="inst_group=dba" # Escape path... (4 Replies)
Discussion started by: sabkan
4 Replies

6. UNIX for Dummies Questions & Answers

Find recently changed files

Hi, Can you guys tell me how do i find the most recently changed files, say an hour before, few hours before, a day before etc.... Thanks!!!! (3 Replies)
Discussion started by: raghu_shekar
3 Replies

7. AIX

script to ftp recent changed files

I am trying to write a script to ftp all files/directories changed in a 24hour period to another AIX server. I have wrote a script to generate a list of all files changed within a 24 hour period but dont know how to then ftp these to another server. How do incorporate ftp into this script? ... (2 Replies)
Discussion started by: RApds
2 Replies

8. Shell Programming and Scripting

compare files in two directories and output changed files to third directory

I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together. I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 Replies)
Discussion started by: bkeep
4 Replies

9. Shell Programming and Scripting

Trying to Copy Files Changed Recently

I have been toying around with a script that will copy all files altered in a development directory over to a testing directory and have been trying to construct the command to meet my needs. Basically I am using find in a directory to see what files have changed over the past 24 hours. Then if... (4 Replies)
Discussion started by: scotbuff
4 Replies

10. Shell Programming and Scripting

How to compare two flat files and get changed data

Hi, I need to compare two flat files (yesterday & today's data) and get only the changed data from flat files. In flat file i dont have data column or anything its just a string data in flat file.Can any one please let me know the script With Regds Shashi (3 Replies)
Discussion started by: jtshashidhar
3 Replies
Login or Register to Ask a Question