Discussion:
Urgent::shell script help
(too old to reply)
resh
2006-05-08 05:33:51 UTC
Permalink
Hi, got a simple question to you all.


I would like to have a simple shell script to do the following:


I have lots of files in my home directory, I would like to look
into directories /usr/directory1 and /usr/direcotry2, in which
has lots of files too, compare the files in my home directory
to those in /usr/directory1, then /usr/directory2 with the same
file name. If they are identical, then rename the file in my
home diretory to file_name.sqr.trash.


Thanks for your help, please email me at: ***@gmail.com
John DuBois
2006-05-08 17:37:37 UTC
Permalink
Post by resh
I have lots of files in my home directory, I would like to look
into directories /usr/directory1 and /usr/direcotry2, in which
has lots of files too, compare the files in my home directory
to those in /usr/directory1, then /usr/directory2 with the same
file name. If they are identical, then rename the file in my
home diretory to file_name.sqr.trash.
You might start with 'dircmp' to find identical files.

Somewhat easier to use programmatically (to build file lists):
ftp://ftp.armory.com/pub/scripts/comptree
comptree requires:
ftp://ftp.armory.com/pub/scobins/stat

John
--
John DuBois ***@armory.com KC6QKZ/AE http://www.armory.com/~spcecdt/
Loading...