tutorial
Quick project checks with Bash

Bash is useful for answering small questions about a project without reaching for a dedicated tool. A few focused commands can confirm where you are, reveal pending Git changes, and show how much disk space the project uses.
Run a quick project check
From the project root, run these commands one at a time:
pwd
git status --short
du -sh .
The first command prints the current directory, the second gives a compact view of changed files, and the third reports the total size of the project.
Count common file types
The next example counts PHP, JavaScript, and Markdown files. Choose the language you want to use; the Bash tab keeps each file count as a separate command.
find . -type f -name '*.php' | wc -l
find . -type f -name '*.js' | wc -l
find . -type f -name '*.md' | wc -l
import { readdir } from 'node:fs/promises';
const files = await readdir('.', { recursive: true });
for (const extension of ['.php', '.js', '.md']) {
const count = files.filter((file) => file.endsWith(extension)).length;
console.log(`${extension}: ${count}`);
}
<?php
$counts = ['php' => 0, 'js' => 0, 'md' => 0];
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator('.'));
foreach ($files as $file) {
$extension = $file->getExtension();
if (isset($counts[$extension])) {
$counts[$extension]++;
}
}
foreach ($counts as $extension => $count) {
echo ".{$extension}: {$count}\n";
}
These checks are intentionally small, but they are easy to combine with filters such as grep, sort, and head as a project grows.