I have a problem with this command:

su -c 'tar zcvf yourname.tar.gz/etc/var/'

Here is the website for my class assignment.

Some of these command do not work correctly.


  • Close voters: What's unclear here? (other than somebody trying to get his assignment done) :P – Ron Jul 31 '15 at 10:31

The correct command is

sudo su -c 'tar zcvf yourname.tar.gz /etc /var'

or simply

sudo tar zcvf yourname.tar.gz /etc /var

And you forgot the space characters in your command:

su -c 'tar zcvf yourname.tar.gz/etc/var/'
                               ^   ^-- Missing SPACE
                                -- Missing SPACE

Your PDF has a very bad quality, it seems like an OCR output. You shouldn't copy and paste the commands. And the PDF is not written for Ubuntu, therefore some commands and procedures may be wrong.

  • @MayaKoonKoon As you're a reputation 1 user: If this answer helped you, don't forget to click the grey ☑ at the left of this text, which means "yes, this answer is valid"! ;-) – A.B. Jul 28 '15 at 18:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.