bash - Need Assistance Understanding ls -d command in linux -
i'm trying wrap head around 'ls -d' command.
i run command 'ls -d' in given directory , '.'
i run command 'ls -d */ , directories
i run command -ls -d * , files, including aren't directories.
the man page states this:
list directories themselves, not contents
can please explain how switch supposed work?
the things understand are:
ls
lists current directory, otherwise known.
, default.ls -d
makesls
show directory it's listing, not contents of directory.
the behaviors describe follow that:
ls -d
showing.
showing directory you're in -- default target ofls
no arguments given.ls -d */
tells shell runls
each directory under current 1 passed argument;ls -d
shows entries each of arguments, behaving report.ls -d *
tells shell runls
each entry in current directory passed argument.ls
lists 1 entry each such argument, not showing contents of each argument directory name otherwise would.
Comments
Post a Comment