I want to ls -l the files on that list and compare the time stamps and sizes to other servers. And I want to automatize it.
Here is what I have so far:
Some explanations:
/usr/local/bin/hosts is a file which lists all hosts to be synced. /usr/bin/hostname is a file which list the hostname of the server you are running the script from (need it so I can compare the files on the server I'm on as well). /home/user/bin/dirsyncfiles is a file containing the file locations to be checked. /usr/bin/ll is just a custom compiled version of ls -l.
My problem is that the scripts breaks after it lists the files on the first server it checks it on.
Also it is not really usable because it doesn't compare the file time stamps and sizes.I know I could probably use diff to compare them visually or a find | xargs somehow. I'm not really good at doing these little scripts. Is there a better way to do this.
I have another script which the good people of this site have helped me with that compares MD5 sums, but that will only tell me that they are different, and not why.
I know rsync is a to-go tool for these things however I can't use it. I need some help to automate this as best I can without manually checking 30 different file locations on 10 different servers. Sometimes even more files.
I need to compare same set of files in 2 different servers and generate a list (in STDOUT) which contain all the files that have changed. I don't have permission to create any temp files or folders in either servers.
- One option is to use ' if '. But for this I need to move file1 to one server... (1 Reply)
I have the following requirement;
I need to compare set of files in 2 different servers A and B.
Both have same sets of files and directory structure
First I need to move the files from Server A to server B
Compare the corresponding file in B server and see if it has modified (not... (1 Reply)
I have a requirement.
I need to write a shell script which will compare two directories residing in two different servers (SERVER A and SERVER B) and list out the discrepancies if found any.
Script will be running from SERVER A.
Please help. (2 Replies)
Hello,
I've downloaded a huge amont of files
I've got a list of files from a remote server.
-rw-r--r-- 1 str661 strem 453465260 Dec 16 15:54 SATRYS2V1_20021218_temp_bias.nc
-rw-r--r-- 1 str661 strem 17669468 Dec 16 18:01 SATRYS2V1_20021225_hdyn_bias.nc
-rw-r--r-- 1... (9 Replies)
How can we get the directory tree along with the size in two different servers and find the difference between the list..??
Eg,
Server1
dirTree1 -size
Server 2
dirTree2 -size
how can we find the directory tree with its size, and find the difference, where the servers are different... (1 Reply)
I have around 1000 files in a directory (file1.txt, file2.txt, ... file1000.txt), each file is 2 columns, the first colums are same for all of them, second one is different.
file1.txt
1 10
2 20
3 30
4 40
5 50
file2.txt
1 100
2 400
3 500
4 600
5 900
what I need is , I want... (3 Replies)
Hello Lads!
Climbing the shell scripting learning curve, i am faced with yet another obstacle! Here's the challenge in front of me :
1) I have 15 servers in a cluster,all of them have the same config files by name : /home/apps/xrm/App_B.cfg
2) The developers change the entries in the... (5 Replies)
Hi All,
I am running my script in crontab and it is generating a file everyday.
And I have 10 different servers and i am running the same script in every server in crontab which generates a file in every server per day.
I want to retrieve those files from each server everyday.
I want to... (1 Reply)