dir2 2.1.1

There is a newer version of this package available.
See the version list below for details.
dotnet tool install --global dir2 --version 2.1.1
This package contains a .NET tool you can call from the shell/command line.
dotnet new tool-manifest # if you are setting up this repo
dotnet tool install --local dir2 --version 2.1.1
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dir2&version=2.1.1
nuke :add-package dir2 --version 2.1.1

Dir2

v2.1.1.1

Syntax:

dir2 [DIR/WILD ..] [OPT ..]

Example:

dir2 ~/Projects/dir2cs --sub all --excl-dir bin,obj --excl "*.user" --within 3days --not-within 2Mb

or

dir2 ~\Proj*\dir* -s -X bin,obj -x *.user -w 3days -W 2Mb

Help Topcis

Link to Complete Help Topics

On-line help

Command Description
dir2 -? To list common-used options
dir2 -?? To list all options
dir2 -? cfg To list options loading by config file ~\.local\dir2.opt

Common used

Command Description
dir2 -fo size To list files only and order by file size
dir2 -sw 13days To list all files whose time-stamp is within (including) 13 days ago
dir2 -W 4hours To list files whose time-stamp is before 4 hours ago ('w' in upper case)
dir2 -W 123Mb -w 2Gb To list files whose size is larger than 123 Mb and smaller (including) than 2 Gb
dir2 -x *.tmp,*.obj To list excluding some files
dir2 -X .vs,obj To list excluding some dir ('x' in upper case)
dir2 -sH To list all hidden files (excluding file-link, and file in link-dir)

Advanced common used

Command Description
dir2 -so date --sum dir To list dir-sum and order by the earliest of written dates
dir2 -so last --sum ext To list file-ext-sum and order by the last of written dates
dir2 -R To list all directories in a tree structure
dir2 -kb Docu* To list filename with the directory name
dir2 -sx :link To list all files excluding file-link
dir2 -sdX :link To list all directories excluding link-dir
dir2 -s --link only To list all file-links
dir2 -s --dir only-link To list all link-dirs

Provide '--files-from' on pipeline operation

Store '.cs' files from all sub dir on 'my_proj' into a new tar file, or, a new zip file.

dir2 my_proj *.cs -bks | tar -cf ..\backup\today.tar --files-from -
dir2 my_proj *.cs -bks | zip2 -cf ..\backup\today.zip -T -

Example as Unix ls:

Link to "unix-ls" example

dir2 obj/*.dll --show mode,owner

Yung, Chun Kau

<yung.chun.kau@gmail.com>

2024 Jan
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

Version Downloads Last updated
2.2.0 135 2/1/2024
2.1.1 165 1/1/2024
2.1.0 178 11/15/2023
2.0.1 289 2/8/2023
2.0.0 358 1/1/2023
1.1.6 272 12/30/2021
1.1.5 355 12/14/2021
1.1.4 336 11/8/2021
1.1.3 339 10/27/2021
1.1.2 339 10/26/2021
1.1.1 400 10/24/2021
1.1.0 369 10/24/2021
1.0.1 369 10/16/2021

dir-ls command tool across platform.