Question Mikhail in lesson «Sudo», course «CLI fundamentals»

Mikhail

Hello, Hexlet Support Team.

Can you please check if the web link in the 2nd tip is correct?

The 2nd tip reads: "Read more about sudo. There is an example of using the tee utility with sudo in this article"

And the link Read more about sudo provides: https://en.wikipedia.org/wiki/Sudo

Having checked the article, I found no examples of using the tee utility in there. I've checked with <Ctrl+F> and a search term "tee" just to be sure.

Best regards, Mikhail.

1 0

Yaroslav Mikhaylov

Hi, Mikhail! Thanks for noticing, I've fixed a tip description.

An actual example to fill the void: sudo cat sources.list | tee /etc/apt/sources.list. To run a command after a pipeline as a root user, you need to insert a second sudo because the command after a pipeline by default runs with regular user write permissions.

0

Use Hexlet to the fullest extent!

  • Ask questions about the lesson
  • Test your knowledge in quizzes
  • Practice in your browser
  • Track your progress

Sign up or sign in

By sending this form, you agree to our Personal Policy and Service Conditions
Suggested learning programs
profession
Development of front-end components for web applications
10 months
from scratch
Start at any time
profession
Layout with the latest CSS standards
5 months
from scratch
under development
Start at any time