|
|||||||
| Forums | Search Forums | Register | Forum Rules | Man Pages | Albums | FAQ | Members | 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 !! |
|
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||
|
||||
|
Find word in a large file
Hi all I am working on disallowing users to use easy passwords in pam.d setting on RHEL 5.7 and SuSe 11, and I was hoping to add more words into the current cracklib dict, so I use "echo" command to append new words into the file I dont want to add the same words into the dict, I think I have too many redundant words now. I am using grep, but then grep is only going to show me so much, how do I find a word, sort it out alphabetically and pipe it to a file (that i can cross check so I dont end up adding same words into it)? Code:
find /path/to/dir -name "itelli" <ok, im lost with sort,the only option i know is sort -nk and pipe> :( Thanks! ---------- Post updated at 03:32 PM ---------- Previous update was at 03:22 PM ---------- Seems every time I post something here I get results on my own ![]() Code:
find /path/to/dir -name "itelli" | sort -d >/tmp/words.txt |
| Sponsored Links | ||
|
|
#2
|
|||
|
|||
|
Another approach could be to check that the wanted password match some complexity enforced rules (with a minimum number of uppercase , char, figures, punct character and so on ...)
|
| Sponsored Links | ||
|
|
#3
|
|||
|
|||
|
Hi HeadKandi, A better answer would be as follows; Code:
find /path/to/dir -name "itelli" | sort -du >/tmp/words.txt As this will ensure that there are no duplicates in the file. Regards Dave |
| Sponsored Links | ||
|
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
More UNIX and Linux Forum Topics You Might Find Helpful
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Find EXACT word in files, just the word: no prefix, no suffix, no 'similar', just the word | chicchan | UNIX for Dummies Questions & Answers | 6 | 03-30-2012 04:28 PM |
| Find line number of bad data in large file | pchang | Shell Programming and Scripting | 3 | 01-14-2011 12:02 PM |
| Find and analyze variable Strings in a large file. | Ashitaka007 | Shell Programming and Scripting | 4 | 07-09-2010 08:42 AM |
| deleting the complete line that contains a specific word from a large text file | Lucky Ali | Shell Programming and Scripting | 2 | 06-15-2010 09:24 AM |
| find a word in a file, and change a word beneath it ?? | vikas027 | Shell Programming and Scripting | 2 | 02-13-2008 03:23 PM |
|
|