Skip to content

couloum/flc

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

flc - files count
Date: 25 January 2012
Version: 1.1

flc is a little utility that count files recursively in a directory.

Dependencies
============

flc depends only on standards librairies that you should have.

Installation
============

To compile flc, run:
make

Then, to install flc, run as root:
make install

flc will be installed in /usr/local/bin. If you want to change the 
installation path, set the PREFIX variable to something before runing
make install.
Default PREFIX: /usr/local


Usage
=====

Usage: flc [OPTIONS] DIR

Options:
  -d,--directories        Also count directories
  -D,--only-directories   Count only number of directories
  -L,--only-symlinks      Count only number of symbolic links
  -F,--only-regular-files Count only number of regular files
  -h,--help               Show this menu

Efficiency
==========

Count number of files in a directory containing 10 copies of the
2.6.37 linux kernel source.

Performance with find and wc
----------------------------

% time find . -type f | wc -l
  386924
find . -type f  0,73s user 13,07s system 61% cpu 22,538 total

Performance with du and wc
--------------------------

% time du | wc -l
   23882
du  0,72s user 13,54s system 61% cpu 23,018 total

Performance with flc
-------------------

% time flc .
386924
flc .  0,39s user 3,54s system 28% cpu 13,677 total

Todo
====

More options available: 
  - do not cross filesystem
  - do not count hard links

Write a manual

License
=======

This program is realeased under the GNU General Public License License V3.
Please, read COPYING file for more information.

Contact
=======

If you want to help this program, submit a PR, or write an issue.

About

Files count

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published