{"id":13405478,"url":"https://github.com/eizedev/PSItems","last_synced_at":"2025-03-14T10:30:41.994Z","repository":{"id":55063434,"uuid":"522662226","full_name":"eizedev/PSItems","owner":"eizedev","description":"A PowerShell module that finds files, file content, folders and their information in a really fast and easy way! Similiar to linux/unix find, grep and du commands.","archived":false,"fork":false,"pushed_at":"2023-12-25T01:13:06.000Z","size":1309,"stargazers_count":16,"open_issues_count":0,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-05-01T17:38:42.893Z","etag":null,"topics":["du","filesystem","find","get-childitem","grep","items","pester","plaster","platyps","powershell","powershell-core","powershell-gallery","powershell-module","powershell-script","psake","psfind","psgrep","pssize","pwsh","stucco"],"latest_commit_sha":null,"homepage":"https://www.powershellgallery.com/packages/PSItems","language":"PowerShell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/eizedev.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":".github/CONTRIBUTING.md","funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null},"funding":{"github":"eizedev"}},"created_at":"2022-08-08T18:24:24.000Z","updated_at":"2024-04-01T17:59:22.000Z","dependencies_parsed_at":"2024-01-18T23:04:57.043Z","dependency_job_id":"f5b37a38-dfc5-4844-9dee-9c583483287a","html_url":"https://github.com/eizedev/PSItems","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eizedev%2FPSItems","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eizedev%2FPSItems/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eizedev%2FPSItems/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/eizedev%2FPSItems/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/eizedev","download_url":"https://codeload.github.com/eizedev/PSItems/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221458045,"owners_count":16825265,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["du","filesystem","find","get-childitem","grep","items","pester","plaster","platyps","powershell","powershell-core","powershell-gallery","powershell-module","powershell-script","psake","psfind","psgrep","pssize","pwsh","stucco"],"created_at":"2024-07-30T19:02:03.353Z","updated_at":"2024-10-25T20:30:16.348Z","avatar_url":"https://github.com/eizedev.png","language":"PowerShell","readme":"# PSItems\n\n| GitHub Actions                                                         | PS Gallery                                          | License                              | Issues                            |\n| ---------------------------------------------------------------------- | --------------------------------------------------- | ------------------------------------ | --------------------------------- |\n| [![GitHub Actions Status][github-actions-badge]][github-actions-build] | [![PowerShell Gallery][psgallery-badge]][psgallery] | [![License][license-badge]][license] | [![Open Issues][issues-badge]][issues]  |\n\n---\n\nA PowerShell module that finds files and directories as well as file content and file and directory information the quick and easy way!\n\n![Logo](res/logo.png)\n\n---\n\n- [PSItems](#psitems)\n  - [Overview](#overview)\n  - [Roadmap](#roadmap)\n  - [Installation](#installation)\n  - [Usage](#usage)\n    - [Functions](#functions)\n    - [Help](#help)\n  - [Testing and Speed](#testing-and-speed)\n    - [1 - Windows directory recursively - Return FullName strings](#1---windows-directory-recursively---return-fullname-strings)\n    - [2 - Windows directory recursively - Return FileInfo objects](#2---windows-directory-recursively---return-fileinfo-objects)\n  - [Contributions](#contributions)\n\n---\n\n## Overview\n\n---\n\n\u003e Take at look at the [Changelog](CHANGELOG.md) for latest changes.\n\n---\n\n| PowerShell  | Linux/Unix    |    Description   |\n| --------------------------| --------------------- | ------------------------|\n| `psfind` -\u003e Find-Item       | `find`        | `psfind` is similiar to linux/unix `find` command       |\n| `psgrep` -\u003e Find-ItemContent  | `grep` | `psgrep` is similiar to linux/unix `grep` command |\n| `pssize` -\u003e Get-ItemSize  | `du` | `pssize` is similiar to linux/unix `du` command |\n\n| CmdLet  | Command    |    Description   |\n| --------------------------| --------------------- | ------------------------|\n| `psfind`       | `psfind`       | Without parameter psfind returns all items (files, junctions, directories...) with full path in current directory     |\n| `pssize`  | `pssize` | `Without parameter psfind rUses all items (files, junctions, directories...) in current directory and return size in MB |\n| `psgrep`  | `psgrep 'test'` | returns all files where `'test'` was found in format `filename: line` in the current directory |\n\n---\n\n\u003e ``📝`` The functions of the module do not run with Windows PowerShell, they require at least PowerShell \u003e 6.0 or a newer version. The [latest, stable PowerShell version](https://github.com/PowerShell/PowerShell/releases) is always recommended\n\n---\n\nAs a person who works a lot with Linux distributions and had not found a way on Windows to find files or folders or their information in a FAST way, I developed this module or functions.\nAt the beginning I was looking for an alternative to the Linux `find` and developed `Find-Item`.\n\nOf course, all the functions in this module will be working on Windows, Linux and macOS.\n\n`Get-ChildItem` works great to get an overview of current files and folders, but is very, very slow when dealing with a lot of filesystem objects.\nSo I decided to use the .NET api directly and used only the functionalities I really need for the particular case.\n\nSince then, I don't have to bother with the Windows Explorer built-in search or struggle around with slowly calling `Get-ChildItem`.\n\nThe term \"**item**\" in PSItems or also the individual function names is a collective term for all file system objects, such as files and directories.\nTherefore, for example, the function is called `Find-Item` and not `Find-File`, because with it also junctions, directories, shortcuts etc. can be found.\n\n## Roadmap\n\n\u003e ``📝`` This module is currently under construction and therefore in BETA. The already integrated functions work basically but can still have errors.\n\n- Tests\n  - Add Pester Tests for `Get-ItemSize` and `Find-Item` and `Find-ItemContent`\n    - [ ] Windows\n      - in progress\n    - [ ] Linux\n    - [ ] macOS\n      - in progress\n- Documentation\n  - Update documentation for functions with more, detailed examples\n    - [ ] `Find-Item`\n    - [ ] `Get-ItemSize`\n    - [ ] `Find-ItemContent`\n- Security\n  - Add code scanning using github workflow\n- New functions and features\n  - Further functions around FileSystem objects will be integrated if required. Suggestions are welcome\n\n## Installation\n\nInstallation of this module is straight forward, just install it and import it.\n\n```pwsh\nInstall-Module -Name PSItems\nImport-Module -Name PSItems\n```\n\n## Usage\n\nThe usage and a few examples can be found in the [documentation folder](docs/en-US/) or by using the `Get-Help` cmdlet.\n\n| Cmdlet                                            | Description                                                                                         | Documentation                                  |\n| ------------------------------------------------- | --------------------------------------------------------------------------------------------------- | ---------------------------------------------- |\n| [Find-Item](PSItems/Public/Find-Item.ps1)       | Simple and fast function for finding any item on the filesystem (like find on linux/unix)           | [Find-Item](docs/en-US/Find-Item.md)       |\n| [Get-ItemSize](PSItems/Public/Get-ItemSize.ps1) | Simple and fast function for getting the size of any item on the filesystem (like du on linux/unix) | [Get-ItemSize](docs/en-US/Get-ItemSize.md) |\n| [Find-ItemContent](PSItems/Public/Find-ItemContent.ps1) | Simple and fast function for finding any given string (regex pattern) in files on the filesystem (like grep on linux/unix) | [Find-ItemContent](docs/en-US/Find-ItemContent.md) |\n\n---\n\n### Functions\n\nGet functions of module:\n\n```pwsh\nGet-Command -Module PSItems -CommandType All\n```\n\n```pwsh\nCommandType     Name                                               Version    Source\n-----------     ----                                               -------    ------\nAlias           psfind -\u003e Find-Item                                0.3.1      PSItems\nAlias           psgrep -\u003e Find-ItemContent                         0.3.1      PSItems\nAlias           pssize -\u003e Get-ItemSize                             0.3.1      PSItems\nAlias           search -\u003e Find-Item                                0.3.1      PSItems\nAlias           size -\u003e Get-ItemSize                               0.3.1      PSItems\nFunction        Find-Item                                          0.3.1      PSItems\nFunction        Find-ItemContent                                   0.3.1      PSItems\nFunction        Get-ItemSize                                       0.3.1      PSItems\n```\n\n---\n\n### Help\n\nGet help of function:\n\n```pwsh\nGet-Help Find-Item\n```\n\n```pwsh\nNAME\n    Find-Item\n\nSYNOPSIS\n    Simple and fast function for finding any item on the filesystem (like find on linux/unix)\n\n\nSYNTAX\n    Find-Item [[-Path] \u003cString\u003e] [[-Name] \u003cString[]\u003e] [-Type \u003cString\u003e] [-Recurse] [-IgnoreInaccessible \u003cBoolean\u003e] [-As \u003cString\u003e] [-MatchCasing \u003cString\u003e] [-AttributesToSkip \u003cString[]\u003e] [-MatchType\n    \u003cString\u003e] [-Depth \u003cInt32\u003e] [-ReturnSpecialDirectories] [\u003cCommonParameters\u003e]\n...\n```\n\n## Testing and Speed\n\n\u003e Testsystem was a windows 10 Lenovo T480 (SSD + Indexing disabled).\n\n### 1 - Windows directory recursively - Return FullName strings\n\nReturned will be an array of the path of all files (FullName).\n\n`Measure-Command { $windir = search C:\\Windows\\ '*' -Recurse -AttributesToSkip 0 }`\n\nFinding all items (files, directories...) in `C:Windows` directory including all subdirectories (`-Recurse`) as well as hidden and system files (`-AttributesToSkip 0`) using the `Find-Item` function\n\nThe alias `search` was used and for the `-Path` (`C:\\windows`) and `-Name` (`'*'`) parameter the first and second position were used:\n\n![image](https://user-images.githubusercontent.com/6794362/183594261-2f14beb8-be96-4181-8719-1b95ff271e62.png)\n\nIn about 1 minute the function found all files, directories etc. in the complete windows directory and returned an array of all item `FullName` properties.\n\n### 2 - Windows directory recursively - Return FileInfo objects\n\nReturned will be an array of objects (FileInfo) of all items. Same as using Get-ChildItem.\n\n`Measure-Command { $windir = search C:\\Windows\\ '*' -Recurse -AttributesToSkip 0 -As FileInfo }`\n\nFinding all items (files, directories...) in `C:Windows` directory including all subdirectories (`-Recurse`) as well as hidden and system files (`-AttributesToSkip 0`) using the `Find-Item` function.\n\nThe alias `search` was used and for the `-Path` (`C:\\windows`) and `-Name` (`'*'`) parameter the first and second position were used:\n\n![image](https://user-images.githubusercontent.com/6794362/183596627-73995cca-a602-4ae7-9e75-8fe8b6d14d4a.png)\n![image](https://user-images.githubusercontent.com/6794362/183596709-de8718c9-e361-4843-96f5-34e9677f840e.png)\n\nIn about 2 minutes the function found all files, directories etc. in the complete windows directory and returned an array of FileInfo objects of all items with all properties. As with Get-ChildItem, you can simply continue to use the individual objects.\n\n## Contributions\n\nThe goal of this project is to write simple but (very) fast functions for finding (and perhaps managing) FileSystem Objects and their information.\n\nAdditional features or capabilities that benefit the community are welcome.\n\nIf you find bugs, please report them on the [issues page](https://github.com/eizedev/PSItems/issues) or, if you can, open a pull request directly with a solution.\nIf you have a good idea for improving individual features or for new features, feel free to let me know as well.\n\n[github-actions-badge]: https://github.com/eizedev/PSItems/workflows/CI/badge.svg\n[github-actions-build]: https://github.com/eizedev/PSItems/actions\n[psgallery-badge]: https://img.shields.io/powershellgallery/dt/PSItems.svg\n[psgallery]: https://www.powershellgallery.com/packages/PSItems\n[license-badge]: https://img.shields.io/github/license/eizedev/PSItems.svg\n[license]: https://www.powershellgallery.com/packages/PSItems\n[issues-badge]: https://img.shields.io/github/issues-raw/eizedev/PSItems.svg\n[issues]: https://github.com/eizedev/PSItems/issues\n","funding_links":["https://github.com/sponsors/eizedev"],"categories":["PowerShell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feizedev%2FPSItems","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feizedev%2FPSItems","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feizedev%2FPSItems/lists"}