banner
老孙

老孙博客

资深网民孙先生
mastodon
email

linux remote copy command scp and resolving not a regular file

Recently, I started exploring Ubuntu and found that using the command line for uploading and downloading is quite convenient. If you want to back up data locally, you can use the scp command. scp provides several options that can be added after scp.

> -p Preserve the timestamps of the source files when copying.
> -q Do not display any prompt messages during file copying.
> -r Copy the entire directory.
> -v Display prompt messages when copying files.

To download all files from the /home/adm/ directory on the remote host 192.168.1.23 to the local /home/sun/ directory, use the following command:

scp -r root@192.168.1.23:/home/adm/ /home/sun/

After pressing enter, enter the password and you're done.

PS: When transferring files with scp in Linux, you may encounter the error "scp: /usr/tools: not a regular file" which means the transfer was not successful.

Possible solutions:

  1. Check if you have the necessary permissions using chmod 777.
  2. Use the -r parameter when using scp.
Loading...
Ownership of this post data is guaranteed by blockchain and smart contracts to the creator alone.