![]() |
|
|
|
|
|||||||
| Forums | Portal | Register | Forum Rules | FAQ | Contribute | Members List | Arcade | 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 here. |
|
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| directory tree | ravi raj kumar | Shell Programming and Scripting | 3 | 01-24-2008 10:08 AM |
| Searching directory tree | blane | Shell Programming and Scripting | 7 | 05-29-2007 04:30 PM |
| directory as tree | anything2 | High Level Programming | 2 | 03-01-2007 06:38 AM |
| Production Directory Structures | jbrubaker | UNIX for Dummies Questions & Answers | 6 | 07-11-2006 07:18 AM |
| Directory tree search??? | solvman | High Level Programming | 3 | 09-28-2001 10:27 AM |
|
|
Submit Tools | LinkBack | Thread Tools | Display Modes |
|
#1
|
|||
|
|||
|
help:comparing two directory tree structures only
Hi
I what, a script snippet for "comparing two directory tree structures only " not the contents of directories(like files..etc). Thanking you a lot. Regards Rajesh |
| Forum Sponsor | ||
|
|
|
#2
|
||||
|
||||
|
Please share with us what you have done so far, and let us take a look at your current script that you've attempted to write to solve this problem yourself.
Cheers ZB |
|
#3
|
|||
|
|||
|
If I solve it for you, will i get your mark in computer science in return?
And if i don't, will i have to do the imposition for not doing the homework assignment instead? bakunin |
|
#4
|
|||
|
|||
|
i done with this code but it is displaying the contents of directories as well..i want to test only directory tree structures...
the code is here: #!/bin/sh dircmp -s -w 200 $1 $2 > $3 grep -v $1 $3 > tmp # this line is for deleting page headers echo "files only in directory $1:" > `basename $1`.dir1 echo "files only in directory $2:" > `basename $2`.dir2 cut -f1 tmp >> `basename $1`.dir1 cut -f2 tmp >> `basename $2`.dir2 uniq `basename $1`.dir1 | sed -e '/^$/d' > `basename $1`.output1 uniq `basename $2`.dir2 | sed -e '/^$/d' > `basename $2`.output2 #this line is for deleting blank lines present in output file so can one tell wht changes should be made to the code so taht it can only check the two directory tree structures?? thanks a lot.. Regards Rajesh |
|
#5
|
|||
|
|||
|
Hope this helps
Why do you need to do this ????
ls -l dir2 | grep ^d |awk '{print }' |tee a| ls -l dir1 | grep ^d |awk '{print } ' |tee b|diff a b ~ rm a b --- ls dir1 d1 d2 test1 test1 is a file ls dir2 d1 d2 dir3 dir4 yy yy is a file Output ==== 3,4d2 < dir3 < dir4 |
|
#6
|
|||
|
|||
|
help:comparing two directory tree structures only
Hi every one,
Akriti --> what You have said is correct and Thanx for your reply. but what I want is to even check the subdiretories present in those directories and compare them..what you are showing is only of one level..I want to check two directory tree structures i.e. all the levels present inside those two directories. I want this to check is the newly updated files should be of same directory structure as of previous version. aaiting for your reply soling my problem. Thanking you alot rajesh |
|
#7
|
|||
|
|||
|
help:comparing two directory tree structures only
Hi every one,
Akrathi --> what You have said is correct and Thanx for your reply. but what I want is to even check the subdiretories present in those directories and compare them..what you are showing is only of one level..I want to check two directory tree structures i.e. all the levels present inside those two directories. I want this to check is the newly updated files should be of same directory structure as of previous version. aaiting for your reply soling my problem. Thanking you alot rajesh |
|||
| Google The UNIX and Linux Forums |