WalaWiki content from p1k3.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
1.2 KiB

  1. <[Brent]> Cool! What's it supposed to output? On this BSD box, I get something like:
  2. *
  3. taff ************
  4. taff 1*****
  5. <[Brennen]> A sample of my output:
  6. Dec 1 ****
  7. Dec 2 *************************
  8. Dec 3 ************
  9. Dec 4 *****************************
  10. Dec 5 ********
  11. Dec 6 ****************
  12. Dec 7 *********************
  13. Dec 8 *********
  14. Dec 9 *************
  15. Dec 10 ***************************
  16. Dec 11 ************
  17. Dec 12 ******************
  18. Dec 13 ********************
  19. Dec 14 ***********************
  20. Dec 15 *****************
  21. Dec 16 *************
  22. Which is a frequency plot of change dates for every file in the current directory, more or less.
  23. I would be surprised if it was portable. The options to cut(1) probably break, to begin with.
  24. (Updated entry.)
  25. <[Brent]> Ah-ha! Yep, the problem lay in the options to cut(1). I changed it to c38-44 on my Mac, and it worked as described. Nifty!
  26. <[Brennen]> I'm entirely certain there're better ways to do the first bit than the contortions with ls(1). This might be a way to start - get the ctime formatted as a date from stat(1):
  27. stat -c %z * | cut -f1 -d ' ' | sort | uniq -c
  28. Or maybe this:
  29. find -maxdepth 1 -printf '%TY-%Tm-%Td\n' | sort | uniq -c