compare files in different dir
4 posters
compare files in different dir
i want to compare two directories and list the files that are unique in each directory.....
how to i do it????
how to i do it????
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: compare files in different dir
I tried something... dono if its a round about method... see if you get any idea
ls abcd>>xx.txt & ls chek>>yy.txt |comm xx.txt yy.txt
two directories here are abcd and chek
the first n second columns of the output are unique files
ls abcd>>xx.txt & ls chek>>yy.txt |comm xx.txt yy.txt
two directories here are abcd and chek
the first n second columns of the output are unique files
jeeva- Posts : 50
Points : 93
Join date : 2010-03-04
Re: compare files in different dir
try this :
- Code:
ls -1 . ./chris | grep -v ':' | sort | uniq
Re: compare files in different dir
The dircmp command:
format: dircmp -s dir1 dir2 | uniq
But it will not work here.. it works with some linux..
format: dircmp -s dir1 dir2 | uniq
But it will not work here.. it works with some linux..
DineshThangaraju- Posts : 18
Points : 19
Join date : 2010-02-26
Age : 35
Location : India
Re: compare files in different dir
do u know y it s not working here? s any packages missing?
Last edited by Christopher on Wed Mar 10, 2010 11:44 pm; edited 1 time in total
Re: compare files in different dir
@christopher
../chris....wat is this in ur code????
../chris....wat is this in ur code????
akalya- Posts : 70
Points : 86
Join date : 2010-03-04
Re: compare files in different dir
first dot(.) is for current directory and (./chris) is for "chris" directory inside current directory.
Similar topics
» diff bet $ and # in unix
» how do i compare strings???
» compare and common commands
» to find empty files
» [SYNTAX] Working with Directories and Files
» how do i compare strings???
» compare and common commands
» to find empty files
» [SYNTAX] Working with Directories and Files
Permissions in this forum:
You cannot reply to topics in this forum