-2

Hello everybody i'm copying a folder from a computer to another usign tar and SSH, with the next command, but i don´t understand how cat -> are working. Someone could help me to understand it well?

ssh systemmanager@127.233.117.43 “tar czvpPf - /home/systemmanager/Desktop/test” | cat -> /home/debian/Desktop/backupPrueba.tar.gz

thx

1 Answers1

1

| is "pipe", meaning stream the output of the previous command as input to the next.

- means take arguments from stdin, in this case from the return value of the piped statement.

> is simple file redirection. Redirect the command's normal output (to stdout) to a file named by whatever follows this operator.

The fact that -> are run together is irrelevant. It is two separate operators.

Two-Bit Alchemist
  • 17,966
  • 6
  • 47
  • 82