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:
lslists current directory, otherwise known., default.ls -dmakeslsshow directory it's listing, not contents of directory.
the behaviors describe follow that:
ls -dshowing.showing directory you're in -- default target oflsno arguments given.ls -d */tells shell runlseach directory under current 1 passed argument;ls -dshows entries each of arguments, behaving report.ls -d *tells shell runlseach entry in current directory passed argument.lslists 1 entry each such argument, not showing contents of each argument directory name otherwise would.
Comments
Post a Comment