poniedziałek, 7 lutego 2011

[linux] How many files of a certain type...

If you want  to count how many files of a certain type or similar name you have (in linux), eg. all files starting with a word: "Report" - try:
find . -name 'Report*' | wc -l
  • find
  • . (dot) means here (in this catalogue)
  • -name files or catalogues of a name...
  • 'Report*' name starts with 'Report', asterisk means the rest of the name
  • | and the result put to the another command...
  • wc ... which is count
  • -l means number of lines.
[PL: Sposób znalezienia plików danego typu i policzenia ich ilości w Linuxie]

Brak komentarzy:

Prześlij komentarz