meaning of ls on pwd

saiganesh@LAPTOP-EJBON1NM /bin
$ ls /bin/pwd

saiganesh@LAPTOP-EJBON1NM /bin
$ cd /bin

saiganesh@LAPTOP-EJBON1NM /bin
$ pwd

saiganesh@LAPTOP-EJBON1NM /bin
$ ls
'[.exe'                      fold.exe           ps.exe
 addftinfo.exe               gawk.exe           ptx.exe
 apropos                     gawk-4.2.0.exe     pwd.exe
 arch.exe                    gdiffmk            readlink.exe
 ash.exe                     getconf.exe        readshortcut.exe
 awk                         getent.exe         realpath.exe
 b2sum.exe                   getfacl.exe        rebase.exe
 base32.exe                  getopt.exe         rebaseall
 base64.exe                  gkill.exe          rebaselst
 basename.exe                grap2graph         rebase-trigger
 bash.exe                    grep.exe           refer.exe
 bashbug                     grn.exe            regtool.exe
 bunzip2.exe                 grodvi.exe         rename.exe
 bzcat.exe                   groff.exe          renice.exe
 bzcmp                       grolbp.exe         reset
 bzdiff                      grolj4.exe         rev.exe
 bzegrep                     grops.exe          rm.exe
 bzfgrep                     grotty.exe         rmdir.exe
 bzgrep                      groups.exe         run.exe
 bzip2.exe                   gunzip             runcon.exe
 bzip2recover.exe            gzexe              rvi
 bzless                      gzip.exe           rview
 bzmore                      head.exe           script.exe
 cal.exe                     hexdump.exe        scriptreplay.exe
 ca-legacy                   hostid.exe         sdiff.exe
 captoinfo                   hostname.exe       sed.exe
 cat.exe                     hpftodit.exe       seq.exe
 catman.exe                  iconv.exe          setfacl.exe
 chcon.exe                   id.exe             setmetamode.exe
 chgrp.exe                   indxbib.exe        setsid.exe
 chmod.exe                   info.exe           sh.exe
 chown.exe                   infocmp.exe        sha1sum.exe
 chroot.exe                  infotocap          sha224sum.exe
 cksum.exe                   install.exe        sha256sum.exe
 clear.exe                   install-info.exe   sha384sum.exe
 cmp.exe                     ipcmk.exe          sha512sum.exe
 col.exe                     ipcrm.exe          shred.exe
 colcrt.exe                  ipcs.exe           shuf.exe
 colrm.exe                   isosize.exe        sleep.exe
 column.exe                  join.exe           soelim.exe
 comm.exe                    kill.exe           sort.exe
 cp.exe                      lastlog.exe        split.exe
 csplit.exe                  ldd.exe            ssp.exe
 cut.exe                     ldh.exe            stat.exe
 cygargp-0.dll               less.exe           stdbuf.exe
 cygattr-1.dll               lessecho.exe       strace.exe
 cygblkid-1.dll              lesskey.exe        stty.exe
 cygbz2-1.dll                lexgrog.exe        sum.exe
 cygcheck.exe                link.exe           sync.exe
 cygcrypto-1.0.0.dll         lkbib.exe          tabs.exe
 cygffi-6.dll                ln.exe             tac.exe
 cygformw-10.dll             locale.exe         tail.exe
 cyggcc_s-seh-1.dll          locate.exe         tailf.exe
 cyggdbm_compat-4.dll        logger.exe         tar.exe
 cyggdbm-4.dll               login.exe          tbl.exe
 cyggmp-10.dll               logname.exe        tee.exe
 cyghistory7.dll             look.exe           test.exe
 cygiconv-2.dll              lookbib.exe        tfmtodit.exe
 cygintl-8.dll               ls.exe             tic.exe
 cyglsa64.dll                lzcat              timeout.exe
 cyglsa-config               lzcmp              toe.exe
 cyglzma-5.dll               lzdiff             touch.exe
 cygmagic-1.dll              lzegrep            tput.exe
 cygman-2-7-5.dll            lzfgrep            tr.exe
 cygmandb-2-7-5.dll          lzgrep             troff.exe
 cygmenuw-10.dll             lzless             true.exe
 cygmpfr-4.dll               lzma               truncate.exe
 cygncursesw-10.dll          lzmadec.exe        trust.exe
 cygp11-kit-0.dll            lzmainfo.exe       tset.exe
 cygpanelw-10.dll            lzmore             tsort.exe
 cygpath.exe                 man.exe            tty.exe
 cygpcre-1.dll               mandb.exe          tzselect
 cygpipeline-1.dll           manpath.exe        tzset.exe
 cygpopt-0.dll               mcookie.exe        ul.exe
 cygreadline7.dll            md5sum.exe         umount.exe
 cygserver-config            minidumper.exe     uname.exe
 cygsigsegv-2.dll            mintheme           unexpand.exe
 cygsmartcols-1.dll          mintty.exe         uniq.exe
 cygssl-1.0.0.dll            mkdir.exe          unlink.exe
 cygssp-0.dll                mkfifo.exe         unlzma
 cygstart.exe                mkgroup.exe        unxz
 cygstdc++-6.dll             mknod.exe          update-ca-trust
 cygtasn1-6.dll              mkpasswd.exe       updatedb
 cygticw-10.dll              mkshortcut.exe     users.exe
 cyguuid-1.dll               mktemp.exe         uuidgen.exe
 cygwin1.dll                 more.exe           vdir.exe
 cygwin-console-helper.exe   mount.exe          vi.exe
 cygz.dll                    mv.exe             view
 dash.exe                    namei.exe          wc.exe
 date.exe                    neqn               whatis.exe
 dd.exe                      nice.exe           whereis.exe
 df.exe                      nl.exe             which.exe
 diff.exe                    nohup.exe          who.exe
 diff3.exe                   nproc.exe          whoami.exe
 dir.exe                     nroff              xargs.exe
 dircolors.exe               numfmt.exe         xz.exe
 dirname.exe                 od.exe             xzcat
 dnsdomainname               openssl.exe        xzcmp
 domainname                  p11-kit.exe        xzdec.exe
 du.exe                      passwd.exe         xzdiff
 dumper.exe                  paste.exe          xzegrep
 echo.exe                    pathchk.exe        xzfgrep
 editrights.exe              pdfroff            xzgrep
 egrep                       peflags.exe        xzless
 env.exe                     peflagsall         xzmore
 eqn.exe                     pfbtops.exe        yes.exe
 eqn2graph                   pg.exe             zcat
 ex                          pic.exe            zcmp
 expand.exe                  pic2graph          zdiff
 expr.exe                    pinky.exe          zegrep
 factor.exe                  pldd.exe           zfgrep
 false.exe                   post-grohtml.exe   zforce
 fgrep                       pr.exe             zgrep
 file.exe                    preconv.exe        zless
 find.exe                    pre-grohtml.exe    zmore
 flock.exe                   printenv.exe       znew
 fmt.exe                     printf.exe

saiganesh@LAPTOP-EJBON1NM /bin
[b]$ ls pwd

saiganesh@LAPTOP-EJBON1NM /bin

Open in new window

as above why ls of pwd shows as pwd?
i am not clear on this
please advise
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

A Q ChoudaryJunior Linux EngineerCommented:
Ls in linux simply mean List of all file in a directory. And pwd mean present working in pwd mean file or directories in present working.which you are using.You also can use
ls -d
ls *
ls -l
ls -l | grep -d
all these command to check  a particular directory
pwd present working directory mean.file or directory in which you are now
gudii9Author Commented:
$ ls pwd

does not able list files and directories under present working directory?


if i do as above it lists all files and directories

$ls pwd

is above is worng usage?
dbruntonQuid, Me Anxius Sum?  Illegitimi non carborundum.Commented:

ls  $(pwd)
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

"ls pwd" means list the file names pwd in the current directory if it exists

as dbrunton suggested "ls $(pwd)" or "ls $PWD" (the pwd is also usually stored in the PWD variable) or "ls `pwd`" will all list the content of the current directory

in each command you type, the first word is the command that will be executed and subsequent words are arguments to the command. there is no reason why typing 'xx pwd' would result in the execution of the pwd command. you'd rather end up with a message complaining that xx does not exist as a command
Gerwin Jansen, EE MVETopic Advisor Commented:
You are on cygwin I believe, correct me if I'm wrong.

Anyway, 'ls' is showing the contents of a directory.

In your case there is a file 'pwd.exe' - the cygwin executable for the pwd command.

When you do 'ls pwd' you instruct ls to show all files that match 'pwd' - this is ONE file - the pwd.exe program. Cygwin is just showing you 'pwd'.

If you would have done 'ls t*' ls would show you all files that start with t

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
nice rephrase folks ;)
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today

From novice to tech pro — start learning today.