https://github.com/sid220/count
https://github.com/sid220/count
Last synced: 3 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/sid220/count
- Owner: Sid220
- License: mit
- Created: 2023-04-17T22:36:42.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-13T12:51:40.000Z (about 1 year ago)
- Last Synced: 2025-01-13T10:35:20.864Z (5 months ago)
- Language: C
- Size: 44.9 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
count -- count the files in a directory
 
=============================================## SYNOPSIS
`count` `[--dir]` `[--hidden]` `[--link]` `[--output=FILE]` `[DIR...]`
## DESCRIPTION
**count** counts the number of files in a directory, or directories. It can also be configured (see [OPTIONS][]) to include directories, symbolic links, and hidden files in that count. Additionally, a C library is provided, see count(3) for more information.
## OPTIONS
These options control what types of files are counted, and whether output is written to a file or standard output.
`-o FILE`, `--output=FILE`:
Output to the given file instead of standard output.`-h`, `--hidden`:
Include hidden files (that is, those beginning with ".") in the file count.`-d`, `--dir`:
Include directories in the file count (non-recursive). Does not include cwd (".") or parent directory ("..")`-l`, `--link`:
Include symbolic links in the file count.Miscellaneous options:
`-?`, `--help`:
Show a short help menu.`--usage`:
Show a quick summary of usage options.`-V`, `--version`:
Show count version and exit.## EXAMPLES
Count the number of files and folders in the home directory, excluding hidden files and folders:
$ count /home/$USER -d
5
$Count the number of files, including hidden and linked ones, in /var/www/html, and output it to the file /home/$USER/count.txt:
$ count /var/www/html -hl --output=/home/$USER/count.txt
$ cat /home/$USER/count.txt
12
$## NOTES
The current working directory ("."), and parent directory ("..") are not included in any counts. No counts are recursive.
## COPYRIGHT
Copyright © 2023 Sidney Trzepacz. License MIT: The MIT License .
This is free software: you are free to change and redistribute it. There is NO WARRANTY OF ANY KIND, to the extent permitted by law.## SEE ALSO
ls(1), wc(1), find(1)