My initial thought was to search your PATH, but if you know what you want which is certainly the tool you should use as suggested below. I also thought at first you wished to trigger the the bash readline support for history, ctrl-r. If that's the case (probably not), then you may also wish to directly peek at $HOME/.bash_history.

For a more portable approach, to the solution to the first problem, it's also rather trivial to break PATH into a list of directories, then to use find to facilitate the listing of their contents in terms of their full path location:

for d in $(echo $PATH | tr ':' '\n'); do find $d -type f; done
Or as sent via an ssh command,
ssh you.remote.host "for d in \$(echo \$PATH | tr ':' '\n'); do find \ +$d -type f; done"
find is also pretty darn flexible, and if you do not wish to use it then there are other utilities you may use to list the contents of each directory in PATH like ls.

In reply to Re: checking command suggestions with Net::SSH::Expect by perlfan
in thread checking command suggestions with Net::SSH::Expect by himanshu.chauhan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.