![]() |
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.
|
|
google unix.com
|
|||||||
| Forums | Register | Forum Rules | Links | Albums | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| 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 |
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
||||
|
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 |
|
||||
|
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 ![]() |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|