66

I get a long list of read-only protected files when I run

rm -r trunk | yes

I am trying to answer yes to all by one command.

How can you answer yes to all questions?

Léo Léopold Hertz 준영
  • 134,464
  • 179
  • 445
  • 697

1 Answers1

150

You have it backward, the correct way is:

yes | rm -r trunk

But the better command would be to have rm not ask you in the first place with:

rm -rf trunk
Zuul
  • 16,217
  • 6
  • 61
  • 88
AndrewF
  • 2,517
  • 1
  • 16
  • 11