Saturday, September 10, 2011

Another scp peculiarity


If you want to scp the content of the current directory (its files and subdirs) to the target, you type:

     scp -r . $HOST:$TARGET

If you want to scp the current directory, along with its name, under the target, you type:

     scp -r ../$CURRENT $HOST:$TARGET

One might argue this is not an scp peculiarity, just my lack of knowledge. Accepted. But now I know!