dir2 2.2.0

dotnet tool install --global dir2 --version 2.2.0
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.2.0
This package contains a .NET tool you can call from the shell/command line.
#tool dotnet:?package=dir2&version=2.2.0
nuke :add-package dir2 --version 2.2.0

Dir2

v2.2.0.0

Syntax:

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

Features

  • Performs MSDOS DIR and UNIX LS command.

  • Group by: File-Ext, or, Group by Dir

  • Filter on: Date, Size, Symbolic-Link

  • Column Selection: File Attribute, File Owner, File Size, Last Written Date, Creation Date, Date of Target Link, Size of Target Link

  • Custom Display Format: Size and Date-Time

  • Color: Column, Total Line

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 --color green

Major Enhancement

  • Color Feature

Color Feature

  • File name of Local Configuration

Config File

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 dir2-cfg.txt
dir2 -? - To list short-cut options
dir2 -? + To list options support quick-help +?

Quick help to an option

Sample Command Sample Ouput
dir2 --sum +? --sum ext | dir | +dir | year
dir2 -w size --within 123kb
--wihtin 123mb

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 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 -

Yung, Chun Kau

yung.chun.kau@gmail.com

2024 Feb

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 134 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 355 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.