Find the answer to your Linux question:
Results 1 to 4 of 4
Hi folks, hope this is the right place to ask this: What is the command "yes" for? All it does is repeatedly putting out the letter "y" or any specified ...
  1. #1
    Just Joined!
    Join Date
    Mar 2010
    Posts
    1

    When and why to use the "yes" command

    Hi folks,
    hope this is the right place to ask this:

    What is the command "yes" for? All it does is repeatedly putting out the letter "y" or any specified string until killed (CTRL-C)... but why the hell would I need this??

    Any ideas? I mean there must be a use for it or it wouldn't be in every linux distribution...

    Thanks in advance!

    Benni

  2. #2
    Linux Enthusiast gerard4143's Avatar
    Join Date
    Dec 2007
    Location
    Canada, Prince Edward Island
    Posts
    714
    I actually found a use for it

    Linux yes Command- To print repeated strings, cmd Example

    Check out the examples at the bottom of the link
    Make mine Arch Linux

  3. #3
    Trusted Penguin Cabhan's Avatar
    Join Date
    Jan 2005
    Location
    Seattle, WA, USA
    Posts
    3,230
    Indeed. "yes" was created to allow automation of tasks that request confirmation. If you have a program that wants you to tell it "y" before it does something, you can now automate that program by piping yes into it.

    Nowadays, Best Practices (TM) tend to include a promptless option for most interactive commands in order to allow easy automation. Because of this, it's fairly rare to see yes used now.
    DISTRO=Arch
    Registered Linux User #388732

  4. #4
    Just Joined! ultimatelinux's Avatar
    Join Date
    Mar 2010
    Posts
    36
    type man yes

Posting Permissions

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