Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

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.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7566545
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T14:26:34+00:00 2026-05-30T14:26:34+00:00

I am trying to do a count of files by date. The date is

  • 0

I am trying to do a count of files by date. The date is a field in the file name itself e.g.

CTCA~AT2~FVT~8388358~ONTAFT2-1~8~P~1100~HR24-500~033189784938~20120224~220306.VER

This is what I did:

find . -name '*VER' |awk -F~ '{print $11}'|uniq -c

This is the output I get:

  1 20120222
  3 20120222
  3 20120224
  3 20120224
  3 20120225
  5 20120225

But I want to sum up the counts like so

  4 20120222
  6 20120224
  8 20120225

How can I do that?

/————————————–/

A simple search with

find . -name '*VER' 

returns

...
./CTCA~AT2~FVT~8388358~ONTAFT2-1~7~P~1100~HR24-200~035699170847~20120217~150754.VER
./CTCA~AT2~FVT~8388358~ONTAFT2-1~8~P~1100~HR24-500~033066015695~20120223~204125.VER
./CTCA~AT2~FVT~7561825~ONTAFT2-1~4~P~1100~HR24-100~035688466560~20120223~085805.VER
./CTCA~AT2~FVT~9078749~ONTAFT2-1~4~P~1100~HR24-200~035580595029~20120209~110625.VER
./CTCA~AT2~FVT~7561825~ONTAFT2-1~5~P~1100~HR22-100~028933090384~20120223~104932.VER
...
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T14:26:35+00:00Added an answer on May 30, 2026 at 2:26 pm

    That’s exactly what uniq -c should do. If it isn’t working it’s because your input isn’t sorted. Try this:

    find . -name '*VER' |awk -F~ '{print $11}'|sort|uniq -c
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to write a PHP script that can upload multiple files. for($i=0;$i<count($_FILES['uploadimg']['name']);$i++){
I'm trying to write a script to pull the word count of many files
I'm trying to figure out how I would read a file, and then count
I'm trying to create a master index file for a bunch of HTML files
Im trying to count how many files can 'find' the script and if its
Trying to count how many elements within the array are not equal to 0,
I am trying to count the number of times a user has clicked on
I am trying to count the occurrences of certain dates in my MySQL table
I'm trying to count the number of times that -- occurs in a string.
I'm trying to count how many distinct value of FLOOR there is but I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.