Put / Transfer Local File To Remote
Transfer Local File To Remote
Transfer a specified local file to a remote server.
put <path/to/local_file> put <path/to/local_file> #!/bin/bash
# Transfer Local File To Remote
put {{path/to/local_file}} import subprocess
# Transfer Local File To Remote
# Make sure to replace <placeholders> with actual values
def run_command():
cmd = [
"put",
"<path/to/local_file>"
]
try:
print(f"Executing: {' '.join(cmd)}")
subprocess.run(cmd, check=True)
except subprocess.CalledProcessError as e:
print(f"Error: {e}")
except FileNotFoundError:
print("Error: put not found. Please install it first.")
if __name__ == "__main__":
run_command() When To Use
When preparing data for upload to remote storage during a project.
Pro Tip
Use the --resume flag for large transfers to handle interruptions gracefully.
Command Builder
Tune the command before you copy it
put <path/to/local_file> Anatomy of Output
Understanding the result
Uploading: local/example.txt → remote/example.txt Upload Summary Shows source and destination of the upload.
Upload completed: 1 file(s) sent. Files Count Confirming the number of files sent.
Upload speed: 1024KB/s Speed Metrics Indicates the rate at which the file was uploaded.
Power User Variants
Optimized versions
put -P example.txt Upload using a non-standard port configuration.
put --resume local/example.txt Resume an interrupted upload session.
Troubleshooting
Common pitfalls
Error: File not found for the specified local path.
Solution: Confirm the local file path is correct and accessible.
Error: Permission denied when uploading the file.
Solution: Check user permissions for the target remote directory.
Error: Disk quota exceeded on the remote server.
Solution: Free up space on the remote machine before attempting upload.
Command Breakdown
What each part is doing
-
put - Base Command
- The executable that performs this operation. Here it runs Put before the shell applies any redirect operators.
-
<path/to/local_file> - Input Files
- The file path or paths supplied to this command.
Alternative Approaches
Comparable commands in other tools
Alternative data processing tools for the same job.
gdown --fuzzy <url> Picotool / Convert Elf Bin To Uf2 picotool uf2 convert <path/to/elf_or_bin> <path/to/output> Aws / List Glue Jobs aws glue list-jobs Aws / List Triggers aws glue list-triggers Aws / Create Dev Endpoint aws glue create-dev-endpoint --endpoint-name <name> --role-arn <role_arn_used_by_endpoint>