[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-81927":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":9,"htmlUrl":10,"language":11,"languages":10,"totalLinesOfCode":10,"stars":12,"forks":13,"watchers":14,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":15,"stars7d":16,"stars30d":17,"stars90d":13,"forks30d":13,"starsTrendScore":18,"compositeScore":19,"rankGlobal":10,"rankLanguage":10,"license":10,"archived":20,"fork":20,"defaultBranch":21,"hasWiki":22,"hasPages":20,"topics":23,"createdAt":10,"pushedAt":10,"updatedAt":28,"readmeContent":29,"aiSummary":30,"trendingCount":13,"starSnapshotCount":13,"syncStatus":31,"lastSyncTime":32,"discoverSource":33},81927,"LinuxLogScanTool","nnotych\u002FLinuxLogScanTool","nnotych","LinuxLogKeywordScanCLIcustomutils","",null,"C",42,0,26,7,13,16,21,59.1,false,"main",true,[24,25,26,27],"linux","linux-desktop","linux-server","linux-shell","2026-06-12 04:01:36","# Logscan\n\n**Logscan** is a small command‑line utility in this repository. \n[![Watch Demo](https:\u002F\u002Fimg.shields.io\u002Fbadge\u002FYouTube-Demo-red)](https:\u002F\u002Fwww.youtube.com\u002Fwatch?v=mdsDAGdLHl8)\n\n\n---\n## Screenshots\n\n![Demo](Scr.jpg)\n\n## Repository layout\n\n- **`src\u002Flogscan.c`** — primary C source required by the build script.  \n- **`src\u002Flogscan_noncurses.c`** — fallback non‑ncurses source; the installer writes this file if ncurses is not available.  \n- **`man\u002Flogscan.1`** — optional man page (installed only if present).  \n- **`install.sh`** — build and install script with modes: `install`, `build-only`, `uninstall`, `help`.  \n- **`Makefile`** — optional helper (if present).\n\n---\n\n## Installer behavior (exact)\n\n- **Modes supported**\n  - `install` — ensure build tools, attempt to build, then install binary and man page.\n  - `build-only` — compile the binary in the current directory only (no system install).\n  - `uninstall` — remove installed binary and man page.\n  - `help` — print usage and exit.\n\n- **Build logic**\n  1. The script **requires** `src\u002Flogscan.c`. If that file is missing the script exits with an error.\n  2. It checks for `gcc`. If `gcc` is missing the script attempts to install build tools using the detected package manager (`apt`, `dnf`, `yum`, `pacman`, `apk`, `brew`) where available. If no package manager is detected it prints instructions to install build tools manually.\n  3. It tests whether ncurses development headers and library are usable by compiling a tiny test program linked with `-lncurses`.\n     - If the test succeeds, the script compiles `src\u002Flogscan.c` with `-lncurses`.\n     - If the test fails, the script attempts to install ncurses dev packages via the detected package manager.\n     - If ncurses still cannot be used, the script writes a small fallback source file `src\u002Flogscan_noncurses.c` (a minimal ANSI fallback) and compiles that instead.\n  4. On success the script produces a local binary named **`logscan`** in the current directory.\n\n- **Install logic**\n  - `install` mode installs the binary to **`\u002Fusr\u002Flocal\u002Fbin\u002Flogscan`** (mode `0755`).\n  - If `man\u002Flogscan.1` exists, it installs it to **`\u002Fusr\u002Flocal\u002Fshare\u002Fman\u002Fman1\u002Flogscan.1`** (mode `0644`).\n  - If `mandb` is available the script runs `mandb` (errors ignored).\n  - `sudo` is required for the install steps that write to system locations.\n\n- **Uninstall logic**\n  - Removes `\u002Fusr\u002Flocal\u002Fbin\u002Flogscan` and `\u002Fusr\u002Flocal\u002Fshare\u002Fman\u002Fman1\u002Flogscan.1` (if present) and runs `mandb` if available.\n\n---\n\n## How to build and install (exact commands)\n\n![Demo](Screensho42.png)\n\n\nRun these commands from the repository root.\n\n**Clone and prepare**\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002Fnnotych\u002FLinuxLogScanTool.git\ncd LinuxLogScanTool\nchmod +x install.sh\n```\n\n**Build only (no install)**\n```bash\n.\u002Finstall.sh build-only\n# On success a local .\u002Flogscan binary will be created\n```\n\n**Install system‑wide**\n```bash\nsudo .\u002Finstall.sh install\n# Installs \u002Fusr\u002Flocal\u002Fbin\u002Flogscan and, if present, \u002Fusr\u002Flocal\u002Fshare\u002Fman\u002Fman1\u002Flogscan.1\n```\n\n**Uninstall**\n```bash\nsudo .\u002Finstall.sh uninstall\n```\n\n**Alternative (Makefile)**\n```bash\nmake\n# If Makefile is present and configured, it may produce the binary without using install.sh\n```\n\n---\n\n## Where files are placed after install\n\n- **Binary**: `\u002Fusr\u002Flocal\u002Fbin\u002Flogscan`  \n- **Man page** (if present): `\u002Fusr\u002Flocal\u002Fshare\u002Fman\u002Fman1\u002Flogscan.1`\n\n---\n\n## How to run and verify\n\n- **Run the built binary in the current directory**\n```bash\n.\u002Flogscan --help\n```\n\n- **Run the installed binary**\n```bash\nlogscan --help\n# or\n\u002Fusr\u002Flocal\u002Fbin\u002Flogscan --help\n```\n\n- **Check man page**\n```bash\nman logscan\n```\n\n- **Verify installed files**\n```bash\nls -l \u002Fusr\u002Flocal\u002Fbin\u002Flogscan\nls -l \u002Fusr\u002Flocal\u002Fshare\u002Fman\u002Fman1\u002Flogscan.1\n```\n![Uploading зображення.png…]()\n\n\n> Note: The installer script does not itself document runtime CLI flags. Use `logscan --help` or `man logscan` (if installed) to see the exact runtime options provided by the compiled binary.\n\n---\n\n## Troubleshooting (concrete steps)\n\n- **`Source file src\u002Flogscan.c not found`**  \n  - Ensure `src\u002Flogscan.c` exists in the repository root. The installer requires this file.\n\n- **`gcc not found`**  \n  - Install build tools manually. Example for Debian\u002FUbuntu:\n    ```bash\n    sudo apt-get update\n    sudo apt-get install -y build-essential\n    ```\n\n- **ncurses test fails and fallback is used**  \n  - To get the ncurses build (interactive mode), install the dev package for your distro:\n    - Debian\u002FUbuntu:\n      ```bash\n      sudo apt-get install -y libncurses5-dev libncursesw5-dev\n      ```\n    - Fedora\u002FCentOS:\n      ```bash\n      sudo dnf install -y ncurses-devel\n      ```\n  - If you cannot install ncurses, the script will compile `src\u002Flogscan_noncurses.c` automatically and produce a fallback binary.\n\n- **Permission denied during install**  \n  - Use `sudo .\u002Finstall.sh install`.\n\n- **Man page not installed**  \n  - The script installs the man page only if `man\u002Flogscan.1` exists in the repository. Add or update that file if you need a man page installed.\n\n- **`mandb` not available or errors updating man database**  \n  - The script ignores `mandb` errors; man pages still install to the target directory.\n\n---\n\n## Minimal checklist before running `install.sh`\n\n- `src\u002Flogscan.c` is present.  \n- You have `sudo` access for `install` mode.  \n- `gcc` and basic build tools are installed or available to be installed.  \n- If you need interactive ncurses support, ensure ncurses dev packages are available on the system.\n\n---\n\n## License and contribution\n\n- Add a `LICENSE` file to the repository root if you want to declare a license (for example, MIT).  \n- Contribution workflow: fork → branch → commit → pull request. Document any new runtime flags in `--help` and `man\u002Flogscan.1`.\n\n---\n\nIf you want this exact content written to a `README.md` file in the repository, I can produce the file contents for you to paste into `README.md`.\n","Logscan 是一个轻量级的命令行工具，用于在 Linux 系统中扫描日志文件并根据关键词进行搜索。该工具采用 C 语言编写，支持 ncurses 和非 ncurses 模式，具有灵活的构建和安装脚本，能够自动检测和安装必要的编译工具及依赖项。此外，它还提供了详细的使用文档和安装指南，方便用户快速上手。Logscan 适用于需要对服务器或桌面环境中的日志文件进行高效检索和分析的场景，尤其适合系统管理员和运维人员使用。",2,"2026-06-11 04:07:14","CREATED_QUERY"]