Compare files with different names in different directories
Hi,
I have a requirement to compare files in different directories with different names. The files have a datestamp in their name (It might not be a sequential datetimestamp).
This is for Redhat Linux. I have more than 5 directories and more than 10 file in each directory to be compared.
Last edited by GosarJunk; 04-03-2015 at 07:38 PM..
Reason: adding code tags
I do not know much about shell scripting and need to create a script and I am at a loss. If someone can help me, that would be great!!
I have two directories:
/dir1
/dir2
I need to get the sequence number which is part of the filename in /dir1 and delete all files in /dir2 that are... (4 Replies)
I have searched about 30 threads, a load of Google pages and cannot find what I am looking for. I have some of the parts but not the whole. I cannot seem to get the puzzle fit together.
I have three folders, two of which contain different versions of multiple files, dist/file1.php dist/file2.php... (4 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)
hi,
can somebody tell me how to compare names of files?
the situation is I have 2 files file1 and file2 and I want to figure out which file has the biggest ending, in this case file2 is.
thank you (3 Replies)
Hi,
Below are the 2 files in directory /tmp:
masterCSF242323.img
indexCSF242323.img
1) I want to compare if both the number (242323) are same in both the files. If they are same print - Files matching, else print files do not match.
2) Also if only index file is present in that... (7 Replies)
I need a script that extracts function names from php files together with their location (path and file in which they are defined).
The php files are located in several directories under a base directory.
Ideally the output should be something like:
"Path/FileName/FunctionName" for a... (2 Replies)
Hi all ,
Can any one give me the solution for below query.
I have two files .
firstfile:
xyz123
abc234
text2456
secondfile (\home\test)
xyz123:ram
ab34:scrit
text2456:maven
After you compare the ouput should the the common items in both files (2 Replies)
Hi All,
I have two directories that has some files, some of the files are common to both of them like :
ls -l dir1
file1
file2
file3
ls -l dir2
file1
file2
file3
file4
file5
Now i want to get the files from dir2 that are not present in dir1 (means i want to get... (2 Replies)
I need to compare two files (oldfile1 & newfile). Need to ignore the values which are present in both files. At the same time, i need to get only records in new file.
Tried using Join -v1 -v2 oldfile1 newfile (suspect it has not worked as expected).
could anyone of you please help me here. (5 Replies)
I have 2 files each containing a list of same fedora packages but with different version number. I want to compare the 2 files and remove the lines containing a newer or older version number (1 Reply)