Ameba Ownd

アプリで簡単、無料ホームページ作成

Sftp command cannot download non regular file

2021.12.20 17:24






















Don Karon Don Karon 91 1 1 silver badge 1 1 bronze badge. You may also be able to use use scp. The general format is scp -rp sourceDirName username server:destDirName scp means "secure copy". The flags are -r recurse into subdirectories -p preserve modification times I believe the rest of the items are self-explanatory.


Bina Ramamurthy Bina Ramamurthy 61 1 1 silver badge 1 1 bronze badge. Or to upload without recursion: mirror --no-recursion You have to cd into the directories you want to mirror. Works great! Banago Banago 1 1 silver badge 3 3 bronze badges. If you question is actually 'how do I use sftp to transfer a directory', then sftp -r user server But if you transferring a directory, I might suggest two better options, depending on your needs.


Dan Williams Dan Williams 2 2 bronze badges. Gilles 'SO- stop being evil' Gilles 'SO- stop being evil' k gold badges silver badges bronze badges. It's a bit of a kludge but what works for me is to: Use ssh to login to the remote machine Use sftp from the remote machine to your local machine Then use the get command with the -r option to move the directory and all of its files. Matthew Greene Matthew Greene 9 1 1 bronze badge. Bart 1, 1 1 gold badge 8 8 silver badges 23 23 bronze badges.


Does this add any new information to what other answers posted already? This seems to be mostly the same as Using sftp to Transfer a Directory?


Go to the directory where files reside. Example: If you have many files with. Welcome to this forum. Please explain how this answers the OP's question. Sign up or log in Sign up using Google. Sign up using Facebook.


Sign up using Email and Password. Post as a guest Name. Email Required, but never shown. The Overflow Blog. Forum » Support and Bug Reports ». Reply to topic Log in. Author Message Posted. I saved this script in. Any idea where is the problem. Please attach a full log file showing the problem using the latest version of WinSCP.


I found this just by typing help from sftp. The above will preserve times and modes of the original files and subdirectories. This is especially useful for the retrieval of backups. Sign up to join this community. The best answers are voted up and rise to the top. Stack Overflow for Teams — Collaborate and share knowledge with a private group.


Create a free Team What is Teams? Learn more. How do I get an entire directory in sftp? Ask Question. Asked 12 years, 2 months ago. Active 3 years ago.


Viewed k times. Improve this question. Matthew Matthew You may consider upgrading your servers as it also adds a lot of bug fixes and better security features. Wow, sftp is basically useless as is. Add a comment. Active Oldest Votes. Improve this answer. Matthew Thank you for putting an answer that actually answers the question. Gives me: get: Invalid flag -r — ghbarratt. This also gives me Invalid flag. I'm not sure this is supported on all systems.


Illegal option with CentOS 6.