Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

How can I filter a wordlist to only include words of a certain minimum size?

I’d like to have a file/list of all passwords in rockyou.txt that are greater than or equal to 10 characters. I’d imagine there’s some one-liner like cat rockyou.txt | grep (length >= 10) > output.txt but I can’t get the right syntax

>Solution :

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

Using :

awk 'length($0) >= 10' rockyou.txt

Using :

grep -P '^.{10,}' rockyou.txt

or

grep '^.\{10,\}' rockyou.txt

Using :

perl -ne 'print if length() >= 10' rockyou.txt
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading