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 > UNIX for Dummies Questions & Answers
.
google unix.com



UNIX for Dummies Questions & Answers If you're not sure where to post a UNIX or Linux question, post it here. All UNIX and Linux newbies welcome !!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
new NIC card doesn't show in show-nets iperez SUN Solaris 13 09-26-2008 04:52 AM
Secondary groups show in groups but don't show in id (Not working) zen03 HP-UX 4 12-31-2007 11:15 AM
Unix ls to show full paths mr_bold UNIX for Dummies Questions & Answers 3 02-05-2007 07:58 PM
how to make VI editor show colors in Unix whatisthis Shell Programming and Scripting 7 05-27-2006 01:57 AM
what command can show calendar in unix system? kennethchow UNIX for Dummies Questions & Answers 2 12-20-2005 05:17 AM

Reply
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 2 Weeks Ago
Master00 Master00 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 2
show duplicates in unix

Hi, im a new member. Nice to meet you!

I have a question, if someone could help me, ill really apreciate. It would make my daily work easier.

i want to make a depth search of files in /log which the first 4 characters duplicate and with .kur extension.

Example:

/log/1/0124_155178.cas
/log/1/0227_155155.kur
/log/1/0227_155911.kur

In this case i would like this on screen:

/log/1/0227_155155.kur
/log/1/0227_155911.kur

im new in unix , ive tried this:

find /log . -name *.kur | uniq -d -w 4

but it dosent seem to work, but if i go into a directory that has duplicates it works with

ls | uniq -d -w 4

Why the first command dosent work?

Sorry for my terrible english, i try my best.

Edit: Sorry i just saw theres a "UNIX for Dummies Questions & Answers" forum. Could someone move this thread there? Thanks in advance.

Last edited by Master00; 2 Weeks Ago at 06:55 PM.. Reason: wrong forum
  #2 (permalink)  
Old 2 Weeks Ago
rdcwayx rdcwayx is online now
Registered User
  
 

Join Date: Jun 2006
Posts: 207
no dot in your command.

Code:
find /log -name *.kur | uniq -d -w 4
  #3 (permalink)  
Old 2 Weeks Ago
Master00 Master00 is offline
Registered User
  
 

Join Date: Nov 2009
Posts: 2
Thanks for your answer but it dosent work. It stops searching in 10 sec and it gives only 1 result when theres a lot of duplicates in diferent directorys and that result it isnt even duplicated.

if i go directly to a directory that has duplicates with a ls | uniq -d -w 4 works fine. I want to do a complete search in /log.

thanks in advance

---------- Post updated at 07:52 AM ---------- Previous update was at 07:47 AM ----------

Just found what is happening, if i do -w 4 it reads the first 4 characters of the full path. How can i do so it reads the first 4 characters from the file name?

---------- Post updated at 07:54 AM ---------- Previous update was at 07:52 AM ----------

nevermind , i have it. Thanks
Reply

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 12:17 AM.


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