Suivez-nous
NEWSLETTER
Acheter votre format
Livre papier12,90 €
Un outil de référence complet et pratique

Treefilesize

Ever run tree and wished you could see file sizes right next to each item? Or used du -sh but missed the hierarchical clarity? Enter treefilesize — a simple but powerful command-line utility that displays directory structures along with human-readable file sizes.

Meet treefilesize – a simple trick on top of the classic tree command. treefilesize

git clone https://github.com/yourname/treefilesize cd treefilesize sudo cp treefilesize /usr/local/bin/ Ever run tree and wished you could see

#!/bin/bash tree -h --du "$@" (Note: GNU tree supports -h for human-readable sizes and --du for disk usage.) Meet treefilesize – a simple trick on top

import os def tree_filesize(start_path, indent=''): for item in sorted(os.listdir(start_path)): path = os.path.join(start_path, item) size = os.path.getsize(path) if os.path.isfile(path) else 0 size_str = f"size/1024:.1f KB" if size < 1024 1024 else f"size/(1024 1024):.1f MB" print(f"indent├── item (size_str)") if os.path.isdir(path): tree_filesize(path, indent + '│ ')

$ treefilesize ~/Projects -d 2 -s Title: Find Large Files Instantly with treefilesize

Open your terminal. Ever run du -sh and gotten confused? Or ls -la and lost track?

Ressources à télécharger

PDF
120 exercices corrigés Bled Tout-en-un
Lecteur
Télécharger
Nos sélections liées

Les indispensables pour réussir l'année scolaire 2026 !

Découvrez tous nos ouvrages de soutien pour réviser tout au long de l'année dans toutes les matières, de la maternelle au lycée !