You can use md5 or cksum to get a checksum for each file. Assuming you have identical filename, each directory has the same number of files in both directories and the directories are:
/path/to/source/dir1 and /path/to/source/dir2
try something like this (untested)
I have two file in a Directory.I want a script which will compare the Size of Two file.
Can Anyone Help me on this:
linasplg11:/opt/dataout/kk/linasplg11 # cat size
-rwxrwxrwx 1 root root 16658 Jan 8 13:58 lina_IP_SIP_1231325621210.xml
-rwxr-xr-x 1 root root 16672 Jan 8 14:30... (1 Reply)
hi,
i am new to this site.
i want to write a script to compare the file size of the files in the current dir with the files in the previous directory.
the files name will be same, but the filename format will be as xyzddddyymm.txt. the files will arrive with the month end date(i want to... (5 Replies)
Hi guys,
I have the following, and would like to enhance it be be able to run it in the hard coded directory and compare each file in the directory with the expectedSizeHow would I go about doing this?
Thanks,
Bloke
#!/bin/sh
] || { echo "Usage: watchSizes 400"; exit 0 ; }
#Hammer: How... (1 Reply)
Hi ALL.
Wanted to ask on how to compare a directory from both remote server.
Example:
server0>$ diff -r men@server1:/main/dir1 men@server2:/main/dir1
Many thanks in advance. (4 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)
Hi friends, can anyone help me comparing files in a directory. I have files f1, f2, f3, f4, f5, f6, f7, f8 in a directory each created on a daily basis as f1 on day1, f2 on day2, f3 on day3, f4 on day4, f5 on day5, f6 on day6, f7 on day7, f8 on day8. I need ignore the latest two files (here f7 and... (5 Replies)
Hi there,
I am having trouble with a script I have written, which is designed to search through a directory for a header and payload file, retrieve a string from both filenames, compare this string and if it matches make a backup of the two files then move them to a different directory for... (1 Reply)
How to compare new version exist of two path directory.
for e.g., path1 - /user/path/test/
path2 - /user/path/score/
If its exist new version then copy that new version into the first path directroy. How will do this. (3 Replies)
Dears,
Would you please help on following bash script:
I want to get the most recent file named alfaYYYYMMDD.gz in one directory:
for example:
in directory /tmp/
ls -ltr
alfa20130715.gz
holding.gz
alfa20130705.gz
sart.txt
merge.txt.gz
alfa20130802.gz
my result shoud be... (1 Reply)
hi, I need to know if a specific directory exists in a folder named after the date of yesterday (02/06/2015)
The problem is simple but not how to do it. :confused:i= date -d "yesterday" '%Y-%m-%d' <- the format of directory is 2015-06-02
if in /var/logroot/index exist directory whit... (4 Replies)