I want to sort a big text file (about 12 Giga), by counting the occurrences of each line. For that I have used :
sort file.txt | uniq -c > sorted
But it is taking forever because of geometrical expansion. Any idea?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
d now contains a dictionary, where each key is a unique line, and the value is the count of that line.