I have installed the 18.04 LTS server version. I did different commands like:

tar -xzf xxxx.tar.gz xxxx/ (without GUI)
hadfs dfs -put input /input (with GUI)

I did other commands which work with folder too.

However, after this, I installed a GUI using:

sudo apt install tasksel
sudo tasksel install ubuntu-desktop

However, with the GUI installed and using the terminal, some of these commands which work with folder 'change' and maybe I do not need to put the initial or final slash or put it.

My doubt is: why sometimes without the GUI that command is correct and with the GUI the use of the slash change? Maybe is because the GUI that I installed? Or is it a basic noob fail because of my lack of knowledge with Linux systems?

  • I don't really understand what you're trying to say but see the man pages for those commands! I don't think the desktop has something to do with this behaviour! – George Udosen Oct 14 '18 at 11:52
  • For instance, when I run the tar command before installing the GUI, it worked fine, but after, it didn't work. The difference in that command is that slash. – CGG Oct 14 '18 at 11:57
  • Was this done on the same folder when done in the GUI? – George Udosen Oct 14 '18 at 11:59
  • Yes, I am in the same folder and I have done all the same steps. This is why I do not understand if maybe this is because the GUI modifies something, some mistake of mine because I am very 'noob' with Linux... – CGG Oct 14 '18 at 12:21
  • This command tar -xzf xxxx.tar.gz xxxx/ (without GUI) should be tar -xzf xxxx.tar.gz, you are extracting not creating! – George Udosen Oct 14 '18 at 12:30

I see an error in your command. This tar -xzf xxxx.tar.gz xxxx/ ought to be tar -xzf xxxx.tar.gz. To create a compressed tar file you use:

tar -zcvf xxxx.tar.gz xxxx/

And uncompressing on an already existing folder will simply overwrite it not produce an error. If you intended to uncompress it into a destination folder thenn the command would be:

tar -C xxxx/ -xzvf xxxx.tar.gz

Note: The z is superfluous when used in extracting as tar can determine the right decompression algorithm to use.

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.