Build with
cargo build --release
And the executable will be in target/release/fcount
.
fcount [FLAGS] <directory>
(Arguments can be in any order.)
And it should output:
Files: x
Folders: y
Symbolic Links: z
Flags include:
Flag | Description |
---|---|
-h, --help | Displays help. |
-f | Do not count files. |
-d | Do not count folders. |
-s | Do not count symbolic links. |
-n | Show numbers only, seperated by lines, in order: files, folders, symbolic links. |
-r | Traverse recursively (count in sub folders, and sub folders of sub folders...). |
-V, --version | Displays version information. |
All counts are enabled as default, as I figured most people want all counts most of the time.
Flags can be chained together (unless verbose like --help
), like this: -rsd
, or done seperately: -r -s -d
.
fcount -rs /my/directory
Output:
Files: x
Folders: y
fcount /my/directory
Output:
Files: x
Folders: y
Symbolic Links: z
fcount -rns /my/directory
Output:
x
y