hatena75の活動記録

技術メインで活動記録を残します。

WSLにはlsもdirもmanもhelpもある

2018年末に書いた記事のアーカイブです。

 

小ネタです。WSLはlsとdirどちらもあったり、manとhelpどちらもあったりと面白仕様になっています。

今回はその一端としてdirとlsに対してmanコマンドを実行してみます。

NAME
ls - list directory contents
SYNOPSIS
ls [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of
-cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . and ..
--author
with -l, print the author of each file
-b, --escape
print C-style escapes for nongraphic characters
--block-size=SIZE
scale sizes by SIZE before printing them; e.g., '--block-size=M' prints sizes in units of 1,048,576
bytes; see SIZE format below

NAME
dir - list directory contents
SYNOPSIS
dir [OPTION]... [FILE]...
DESCRIPTION
List information about the FILEs (the current directory by default). Sort entries alphabetically if none of
-cftuvSUX nor --sort is specified.
Mandatory arguments to long options are mandatory for short options too.
-a, --all
do not ignore entries starting with .
-A, --almost-all
do not list implied . and ..
--author
with -l, print the author of each file
-b, --escape
print C-style escapes for nongraphic characters
--block-size=SIZE
scale sizes by SIZE before printing them; e.g., '--block-size=M' prints sizes in units of 1,048,576
bytes; see SIZE format below

全く同じです。実際に使ってみると表示のされ方(UI)はちょっと違ったりします。