Results 1 to 6 of 6

Thread: Need to find a CLI utility

  1. #1
    Join Date
    Dec 2008
    Location
    Montana, USA
    Posts
    550

    Default Need to find a CLI utility

    I'm looking for a search tool to find the name of a command line executable. For example:

    Code:
    bart@UNIVAC:~> whatdoes "check two files are the same"
    or perhaps tell me the equivalent linux command based on a MS DOS command

    Code:
    bart@UNIVAC:~> whatequiv comp"
    I have a 900 page book I can use but by the time I find what I want, I've forgotten why I wanted it!

    Bart

  2. #2
    Join Date
    Jun 2008
    Location
    Podunk
    Posts
    26,680
    Blog Entries
    15

    Default Re: Need to find a CLI utility

    Hi
    Run the command info then press / to do a regex search in your example enter compare and then press enter, just like vi, press the / and enter to continue your search. Then there is info info or man info
    Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
    SUSE SLE, openSUSE Leap/Tumbleweed (x86_64) | GNOME DE
    If you find this post helpful and are logged into the web interface,
    please show your appreciation and click on the star below... Thanks!

  3. #3
    Join Date
    Jun 2008
    Location
    Auckland, NZ
    Posts
    20,293
    Blog Entries
    1

    Default Re: Need to find a CLI utility

    I'm not sure I completely understand you, but you could use the 'cmp' command (to check that two files are identical) or not.
    Code:
    cmp <file-1> <file-2>
    or using 'diff'
    Code:
    diff <file-1.bin> <file-2.bin>
    *Read the man pages for further info.

    The answer may depend on how you want any differences to be reported.

  4. #4
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    12,506
    Blog Entries
    3

    Default Re: Need to find a CLI utility

    Quote Originally Posted by montana_suse_user View Post
    or perhaps tell me the equivalent linux command based on a MS DOS command

    Code:
    bart@UNIVAC:~> whatequiv comp"
    The answer is "cmp".

    I sometimes need to go the other way (to find the name of the MSDOS command).
    openSUSE Leap 15.1; KDE Plasma 5;
    testing Leap 15.2Alpha

  5. #5

    Default Re: Need to find a CLI utility

    Quote Originally Posted by montana_suse_user View Post
    I'm looking for a search tool to find the name of a command line executable. For example:

    Code:
    bart@UNIVAC:~> whatdoes "check two files are the same"
    or perhaps tell me the equivalent linux command based on a MS DOS command

    Code:
    bart@UNIVAC:~> whatequiv comp"
    I have a 900 page book I can use but by the time I find what I want, I've forgotten why I wanted it!

    Bart
    If you are unsure which command/executable you can use a keyword with apropos.

    Code:
    apropos «keyword»
    You're looking for a command/executable that can compare files then the keyword should be «compare»

    Code:
    apropos compare
    The first field should be the name of the command/executable the second in enclosed with the ( and ) that is should be included when you want to read the man pages. For example apropos compare list cmp and the output looks like this.

    Code:
    cmp (1)              - compare two files byte by byte
    The command you should run is cmp and if you want to read the man pages add the 1 ie
    Code:
    man 1 cmp
    Since you are using openSUSE which is a Linux system the long option with the help word should work.

    Code:
    cmp --help
    Good luck.
    "Unfortunately time is always against us" -- [Morpheus]

    .:https://github.com/Jetchisel:.

  6. #6
    Join Date
    Dec 2008
    Location
    Montana, USA
    Posts
    550

    Default Re: Need to find a CLI utility

    Quote Originally Posted by jetchisel View Post
    If you are unsure which command/executable you can use a keyword with apropos.

    Code:
    apropos «keyword»
    You're looking for a command/executable that can compare files then the keyword should be «compare»

    Code:
    apropos compare
    There you go! Exactly what I was looking for! The comp /cmp was only an example, I find I'm often wanting to do something, and don't know the command. This will be a whole lot easier!


    Thanks!

    Bart

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •