I have a directory with source code and want to figure out the files whose content has changed.
Suppose I have two version of development work called hstmy.1.0 and hstmy.1.7. Directory structure are basically the same. However there may be additional files and directories, whose contents have changed (new source codes, bug fixes, etc).
I want to know which files differ and copy them to a temporary directory
Omit files that exist in one branch but not in the other one?
Compare both text and binary files?
When found files that differ: copy both or one of them? and if that case, from which branch?
Temporary dir will be plain? I mean, if found a file that differ inside two subdirectories, the script will have to create those subdirectories in the temporary dir or could be enough to copy the file without the tree structure?
Why don't you use a source control system for the job?
Omit files that exist in one branch but not in the other one?
Compare both text and binary files?
When found files that differ: copy both or one of them? and if that case, from which branch?
Temporary dir will be plain? I mean, if found a file that differ inside two subdirectories, the script will have to create those subdirectories in the temporary dir or could be enough to copy the file without the tree structure?
Why don't you use a source control system for the job?
I only care about source code changes (.hh, .cc, .awk, .tcsh, .ksh, .f, .F)
I want to just transfer the files without the tree structure to a folder, let's call it updatedcode. Will transfer only from
hstmy.1.7 the files that differ from hstmy.1.0
Yes, my intention is to use svn, but I am only starting on it. In the meantime I have to continue working.
---------- Post updated at 07:31 PM ---------- Previous update was at 07:23 PM ----------
Quote:
Originally Posted by Corona688
There might be a better way to use rsync for this, but this ought to work unless you've been putting spaces in filenames:
There are no spaces in file names. I am working from home and work. I just want to transfer the updated files so I can have a look at the work done on the latest version.
I created source1 and source2. They are identical to directory source. I made changes to source2/TracePDF.cc.
Hello all,
Please help me for a script that compares two files and reads only those records that are to be inserted and updated.
File1:
c_id name place contact_no
1 abc xyz 34567
10 efg uvw 82725
6 hjk wth 01823
2 iuy ... (4 Replies)
If third column contains null value then it should delete the row and i want to know the files which contains null value in 3rd column.Below code is not showing the updated files correctly..not sure what the issue is.plz help me
#!/usr/bin/sh
Scripts=/ushhquest/data001/Scripts
cd... (5 Replies)
I am using the below script to remove the rows which contains null values in the 3rd column.My requirement here is want to get the filenames which row is removed .please help me.
#!/usr/bin/sh
Scripts=/ushhquest/data001/Scripts
cd /ushhquest/data011/TgtFiles/MonthlyData
ls CUSTADDR*.txt >... (4 Replies)
I have an ant script that puts my crontabtemplate changes out on a solaris server. But I am scratching my head trying to figure out what to do next on getting the actual crontab file updated with changes. Somone have suggestions on reads or links to figure this out?
thx in advance (2 Replies)
Hello Friends
I am facing a weird problem :confused:, we receive thousands of files in my system on a daily basis, access time stamp on some of the files are being updated as old time stamp like 1968-01-19, Could some one help me what could be causing this? so that i can narrow down the problem... (4 Replies)
HI
I have a requirement to find the last updated files from a directory whcih has subdirectories and inside them we have files with .txt,.doc,.xls .. extensions. i have to find those files which were updated in the last 1hr and rename the files with respective <sub-directory>_<filename> and copy... (3 Replies)
Hi
i have many sets of files as shown below(here i have shown 2 sets)
basel_aa_20091030.txt
basel_aa_20091130.txt
basel_aa_20091230.txt
basel_bb_20091030.txt
basel_bb_20091130.txt
basel_bb_20091230.txt
from each set of files i need to select the latest updated file(there are... (3 Replies)
I am userB and have a dir
/temp1
This dir is owned by me.
How do I recursively copy files from another users's dir userA?
I need to preserve the original user who created files, original group information, original create date, mod date etc.
I tried
cp -pr /home/userA/* .
... (2 Replies)