![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here. |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Finding the time difference | padma.raajesh | Shell Programming and Scripting | 0 | 02-28-2008 12:12 AM |
| Recursively copy only specific files from a directory tree | sharpsharkrocks | Shell Programming and Scripting | 3 | 01-07-2008 02:16 PM |
| I want to record the difference in the content of files in different directory | singhald007 | Shell Programming and Scripting | 3 | 02-13-2007 12:28 PM |
| finding file in a directory | legato | UNIX for Dummies Questions & Answers | 4 | 01-24-2005 11:27 PM |
| Finding users currently accesing a directory | mehtad | Shell Programming and Scripting | 3 | 11-29-2001 03:34 PM |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
finding difference between 2 directory recursively
Hi,
i'm trying to compare two directories in Unix. I need a recursive search ie my shell script should also compare common files in those two directory and so on... any clues.. ?? |
|
||||
|
Please elaborate as to what your ultimate goal is.
Here's one idea: For each directory, do a "find ." and save the output to a file. In each file, strip out the first part of the path (which would be different between the two files). Cat the files together, piped to "sort | uniq -c" and save that output. The result will be that if your output file shows a 1 before the line, then that file exists only in one of the two directories, and if a 2, then it exists in both. ShawnMilo |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|