When try to install dropbox from command line, I read the commands
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
what does -
mean here? is it previous directory?
command linetar
When try to install dropbox from command line, I read the commands
cd ~ && wget -O - "https://www.dropbox.com/download?plat=lnx.x86_64" | tar xzf -
what does -
mean here? is it previous directory?
Best Answer
Some commands accept
-
in place of a filename, either:-
argument passed towget
after-O
is doing.-
argument passed totar
afterxzf
.The command you showed downloads an archive file with
wget
and unpacks it withtar
. To achieve this, the output ofwget
is piped (|
) to the input oftar
. This is whywget
writes to standard output instead of a file andtar
reads from standard input instead of a file.