Jumat, 11 April 2025

How count up lines in a directory

| Jumat, 11 April 2025

Description

Quick overview of counting up lines inside the directory for all files.

CLI

find "$1" -type f -exec cat {} + | wc -l

ZSH or Bash config

clines() {
  if [ -z "$1" ]; then
    echo "Provider folder argument please."
  else
    find "$1" -type f -exec cat {} + | wc -l
  fi
}

Thanks for your attention. Be happy.


Related Posts

Tidak ada komentar:

Posting Komentar