1

I want to keep only the last line of tree's output or the file+directory count report. Preferably, with the -a switch.

An example output I desire:

585 directories, 37722 files

Is this possible with tree?

Sepp A
  • 63

1 Answers1

1

tail is a standard filter to print last line(s). To print one last line use tail -n 1.

tree -a | tail -n 1