The UNIX and Linux Forums  

Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
Finding cumulative size of files older than certain days rohan076 Shell Programming and Scripting 1 04-28-2008 01:07 PM
Perl: finding pattern and substituting hkjang Shell Programming and Scripting 1 03-03-2008 09:07 PM
Unix shell script for finding top ten files of maximum size abhilashnair UNIX for Dummies Questions & Answers 10 02-18-2008 01:50 AM
Finding a specific pattern from thousands of files ???? aarora_98 Shell Programming and Scripting 6 02-17-2006 08:28 AM
Finding duplicate data in a file dinplant Shell Programming and Scripting 1 12-12-2002 10:34 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 12-01-2006
jerome Sukumar jerome Sukumar is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 22
finding duplicate files by size and finding pattern matching and its count

Hi,

I have a challenging task,in which i have to find the duplicate files by its name and size,then i need to take anyone of the file.Then i need to open the file and find for more than one pattern and count of that pattern.

Note:These are the samples of two files,but i can have more duplicate and original pairs.

Input:
------
File_1 and File_2

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
???????????????????????????????????
Name=Jerome
City=chicago
Name/city:Jerome-Chicago
Address#???????????????????
Place:/Chicago
counry::/US

Name=John
City=Detroit
Name/city:John-Detroit
Address#???????????????????
Place:/Detroit
counry::/US

Name=Josephine
City=Chicago
Name/city:Josephine-Chicago
Address#???????????????????
counry::/US

Check1:
------------
-rwxrwxrwx 1 tstibill tstibill 374 Dec 1 13:03 File1
-rwxrwxrwx 1 tstibill tstibill 374 Dec 1 13:02 File2

374 bytes

Check 2:
-----------
take anyone file suppose File_1 and find the pattern and count for
Name/city:
Address#
Place:/
counry::/

Output
----------
pattern,count,filename
Name/city:,3,File_1
Address#,3,File_1
Place:/,2,File_1
counry::/,3,File_1


I hope,I didnt confuse anyone
  #2 (permalink)  
Old 12-01-2006
jerome Sukumar jerome Sukumar is offline
Registered User
  
 

Join Date: Jul 2006
Posts: 22
For finding duplicates not only by size by file naming convention too

Hi All,
sorry for rephrasing.
while finding duplicates I will use file naming convention(substring of files 1,4) and file size too.
  #3 (permalink)  
Old 12-01-2006
grial's Avatar
grial grial is offline Forum Advisor  
El UNIX es como un toro
  
 

Join Date: Jun 2006
Location: Madrid (Spain)
Posts: 531
This will help:
man find (-name -size)
man grep (-c)
man diff
Regards.
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 04:09 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0