scp -r [email protected]:/path/to/foo /home/user/Desktop/
By not including the trailing ‘/’ at the end of foo, you will copy the directory itself (including contents), rather than only the contents of the directory.
From man scp
(See online manual)
-r Recursively copy entire directories
Related Posts:
- “No such file or directory” but it exists
- How do I set a variable to the output of a command in Bash?
- How to let ‘cp’ command don’t fire an error when source file does not exist?
- Meaning of “! -S” in shell script
- How do I split a string on a delimiter in Bash?
- Ubuntu says “bash: ./program Permission denied” [closed]
- Should I put #! (shebang) in Python scripts, and what form should it take?
- Should I put #! (shebang) in Python scripts, and what form should it take?
- How to concatenate string variables in Bash
- -bash: syntax error near unexpected token `)’
- An example of how to use getopts in bash
- How to delete from a text file, all lines that contain a specific string?
- Copying a local file from Windows to a remote server using scp
- How to mkdir only if a directory does not already exist?
- How do I iterate over a range of numbers defined by variables in Bash?
- How to set ssh timeout?
- commands not found on zsh
- sudo: apt-get: command not found
- How do I iterate over a range of numbers defined by variables in Bash?
- Why do people write #!/usr/bin/env python on the first line of a Python script?
- How to mkdir only if a directory does not already exist?
- Using find to locate files that match one of multiple patterns
- “unary operator expected” error in Bash if condition
- What does “-ne” mean in bash?
- Is there a Python equivalent to the ‘which’ command
- How to reload .bash_profile from the command line?
- What is the purpose of “&&” in a shell command?
- How to generate random number in Bash?
- How to check if a variable is set in Bash?
- Who can access a file with octal permissions “000” on Linux/UNIX?
- How can I compare numbers in Bash?
- What does the line “#!/bin/sh” mean in a UNIX shell script?
- Open and write data to text file using Bash?
- Diff command along with Grep gives “Binary file (standard input) matches”
- python getoutput() equivalent in subprocess
- What is the $? (dollar question mark) variable in shell scripting?
- Is there a TRY CATCH command in Bash
- dquote> result of a execution a program in linux shell
- Using sudo with Python script
- how to fix the issue “Command /bin/sh failed with exit code 1” in iphone
- Run a string as a command within a Bash script
- conditional binary operator expected in shell script
- Block Comments in a Shell Script
- How to get a shell environment variable in a makefile?
- What are the uses of the exec command in shell scripts?
- using rot13 and tr command for having an encrypted email address
- Shell Script: Execute a python program from within a shell script
- sed whole word search and replace
- What’s the difference betwen the single dash and double dash flags on shell commands?
- What is a reverse shell?
- Error unable to access jarfile C:\Jar
- Where to place $PATH variable assertions in zsh?
- How do I use a regex in a shell script?
- syntax error when using command line in python
- How do I copy a file in Python?
- Multi-line string with extra space (preserved indentation)
- syntax error when using command line in python
- How to install JQ on Mac on the command line?
- How to perform grep operation on all files in a directory?
- ‘\r’: command not found – .bashrc / .bash_profile [duplicate]
- OS X: equivalent of Linux’s wget
- How to substitute shell variables in complex text files
- How do I import an SQL file using the command line in MySQL?
- “sed” command in bash
- How can I declare and use Boolean variables in a shell script?
- How to exclude a directory in find . command
- “[ ]” vs. “[[ ]]” in Bash shell
- How to deep copy a list?
- Elegant way to search for UTF-8 files with BOM?
- Given two directory trees, how can I find out which files differ by content?
- How to change the output color of echo in Linux
- Recursively find all files that match a certain pattern
- What is the difference between “#!/usr/bin/env bash” and “#!/usr/bin/bash”?
- Is there a “goto” statement in bash?
- How to colorize diff on the command line
- How can I find out if I have Xcode commandline tools installed?
- Is there a WinSCP equivalent for Linux?
- Command to change the default home directory of a user
- git undo all uncommitted or unsaved changes
- What does “&” at the end of a linux command mean?
- How to recursively download a folder via FTP on Linux
- How to copy a row and insert in same table with a autoincrement field in MySQL?
- Is there a function to make a copy of a PHP array to another?
- Difference between $? and $LastExitCode in PowerShell
- ‘ssh’ is not recognized as an internal or external command
- How to compile C program on command line using MinGW?
- Integer expression expected error in shell script
- how to empty recyclebin through command prompt?
- Delete .DS_STORE files in current folder and all subfolders from command line on Mac
- Access WordPress API Outside of WordPress (command-line PHP)
- Is it possible to export WordPress from command line?
- Where/how are categories stored?
- How do I pass an array as an argument to a WP-CLI command?
- How to determine wordpress base path when wordpress core is not loaded
- Error updating WP-CLI
- Bulk update published posts date randomly using wp-cli?
- Avoid ‘uploads’ 777 permissions: Potential threat or clean solution?
- Can scp copy directories recursively?
- What is the difference between double and single square brackets in bash?
- How do I do Multihop SCP transfers between machines?