syq Fast, programmable file transfer.
Copy, reorganize, and remove files across local filesystems, remote machines, and S3-compatible storage. Choose which files to copy and where they should land, preview the changes, and rerun interrupted copies to resume.
Try a copy
Start with a local directory named project. The same copy can go to a local
folder, an SSH server, or an S3 bucket:
syq cp project --into backup
syq cp project --to server --into backup
syq cp project --to s3://backups --into backup
Each command puts project inside backup. Replace server with an SSH
hostname or alias you normally use, or backups with an existing bucket.
A relative SSH destination starts in your home directory on that server.
See S3 setup for credentials and other providers.
--from and --to choose the source and destination machines or buckets.
Without them, paths are local. --into puts selected names inside a directory;
--as chooses an exact destination name.
To copy the contents of project directly into backup, use --srcs-in:
syq cp --srcs-in project --to server --into backup
Use --dry-run to preview a summary without copying, or --dry-run -v
to list the planned changes by path.
Existing destination files are updated when needed. Unrelated files stay
unless you request --prune.
Start with a tool you know
rsync
Copy a file
rsync
rsync -a report.csv server:/backup/
syq
syq cp report.csv --to server --into /backup
Copies report.csv to /backup/report.csv on server.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -t --mkpath --modify-window=-1 report.csv server:/backup/
-t preserves modification times. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Send a folder to a server
rsync
rsync -a project server:/backup/
syq
syq cp project --to server --into /backup
Copies project to /backup/project. Other entries in /backup stay.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -rlt --mkpath --modify-window=-1 project server:/backup/
-t preserves modification times; -r recurses into directories and -l preserves symlinks. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Rsync can replace an empty destination directory with a source file. Syq refuses file/directory type conflicts, even for empty directories.
Copy the files inside a folder
rsync
rsync -a project/ server:/backup/
syq
syq cp --srcs-in project --to server --into /backup
Copies project/index.html to /backup/index.html. Destination-only files stay.
In rsync, project/ copies the contents; project copies the folder. In syq, a trailing slash does not change placement: use --srcs-in for contents.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -rlt --mkpath --modify-window=-1 project/ server:/backup/
-t preserves modification times; -r recurses into directories and -l preserves symlinks. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Rsync can replace an empty destination directory with a source file. Syq refuses file/directory type conflicts, even for empty directories.
Match a folder, deleting extra files
rsync
rsync --delete -a project/ server:/backup/
syq
syq cp --prune --srcs-in project --to server --into /backup
Updates /backup with the contents of project and removes destination entries absent from the source.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync --delete-after -rlt --mkpath --modify-window=-1 project/ server:/backup/
-t preserves modification times; -r recurses into directories and -l preserves symlinks. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
--delete-after postpones deletion until after the transfer phase, closer to syq’s copy-then-prune ordering.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Rsync can replace an empty destination directory with a source file. Syq refuses file/directory type conflicts, even for empty directories.
Download a file from a server
rsync
rsync -a server:/data/report.csv .
syq
syq cp --from server /data/report.csv --into .
Fetches report.csv into your current directory.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -t --mkpath --modify-window=-1 server:/data/report.csv .
-t preserves modification times. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Preview a copy
rsync
rsync --dry-run --itemize-changes -a project/ server:/backup/
syq
syq cp --dry-run -v --srcs-in project --to server --into /backup
Lists planned changes without copying file data.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync --dry-run --itemize-changes -rlt --mkpath --modify-window=-1 project/ server:/backup/
-t preserves modification times; -r recurses into directories and -l preserves symlinks. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
Rsync can replace an empty destination directory with a source file. Syq refuses file/directory type conflicts, even for empty directories.
Rename a file while copying
rsync
rsync -a report.csv server:/backup/latest.csv
syq
syq cp report.csv --to server --as /backup/latest.csv
Copies report.csv to /backup/latest.csv; the source stays.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -t --mkpath --modify-window=-1 report.csv server:/backup/latest.csv
-t preserves modification times. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
If a requested destination filename is already a directory, rsync copies inside it. Syq refuses to replace that directory with a file.
Choose destination names with a script
A script chooses beach.jpg for a.jpg and summit.jpg for b.jpg.
rsync
rsync -a photos/a.jpg server:/archive/beach.jpg
rsync -a photos/b.jpg server:/archive/summit.jpg
syq
files.ndjson
{"src":{"encoding":"utf-8","value":"a.jpg"},"dst":{"encoding":"utf-8","value":"beach.jpg"}}
{"src":{"encoding":"utf-8","value":"b.jpg"},"dst":{"encoding":"utf-8","value":"summit.jpg"}}
syq cp --mapping files.ndjson -C photos --to server --into /archive
Generate a mapping with a script.
Differences
The command above uses archive mode (-a), which preserves permissions, ownership and special files as well as timestamps and symlinks, where permitted. Syq normally preserves timestamps and links; it keeps existing destination permissions and limits new-file permissions by the destination umask. It does not preserve ownership or copy special files by default.
For a closer match:
rsync -t --mkpath --modify-window=-1 photos/a.jpg server:/archive/beach.jpg
rsync -t --mkpath --modify-window=-1 photos/b.jpg server:/archive/summit.jpg
-t preserves modification times. --mkpath (rsync 3.2.3+) creates missing destination parents. --modify-window=-1 compares fractional seconds too; the simpler command compares only whole seconds.
Syq’s size-and-time comparison ignores trailing fractional digits where the destination timestamp has zeros; rsync with --modify-window=-1 requires exact nanosecond equality. Use content hashing when matching timestamps are not enough.
If a requested destination filename is already a directory, rsync copies inside it. Syq refuses to replace that directory with a file.
These rsync commands run separately. Syq validates the complete mapping for duplicate destinations and file/ancestor conflicts before copying.
rclone
Copy a file
rclone
rclone copyto report.csv s3:backups/reports/report.csv
syq
syq cp report.csv --to s3://backups --as reports/report.csv
Uploads report.csv to reports/report.csv in bucket backups.
Here s3 is an rclone S3 remote. Syq uses AWS credentials and its own endpoint settings.
Differences
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Rclone stores source modification times in S3 metadata named mtime; syq uses syq-mtime and syq-mtime-nsec. Each tool restores its own timestamp format; one tool’s upload does not give the other the same source-time information.
Copy the files inside a folder
rclone
rclone copy project backup
syq
syq cp --srcs-in project --into backup
Copies project/index.html to backup/index.html. Destination-only files stay.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone copy --links --create-empty-src-dirs project backup
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Upload a folder’s contents to S3
rclone
rclone copy project s3:backups/project
syq
syq cp --srcs-in project --to s3://backups --into project
Uploads project/index.html to the key project/index.html in bucket backups.
s3 is an rclone S3 remote. Syq uses AWS credentials and endpoint settings.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone copy --links --create-empty-src-dirs --s3-directory-markers project s3:backups/project
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
--s3-directory-markers stores empty folders as objects whose names end in /.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Rclone stores source modification times in S3 metadata named mtime; syq uses syq-mtime and syq-mtime-nsec. Each tool restores its own timestamp format; one tool’s upload does not give the other the same source-time information.
Rclone --links uploads a symlink as a text file with a .rclonelink suffix. Syq keeps the original name: as a real link on an SSH server, or an object marked as a symlink in S3.
Match a folder, deleting extra files
rclone
rclone sync project backup
syq
syq cp --prune --srcs-in project --into backup
Updates backup with the contents of project and removes destination entries absent from the source.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone sync --links --create-empty-src-dirs project backup
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Download a folder from S3
rclone
rclone copy s3:backups/reports reports
syq
syq cp --from s3://backups --srcs-in reports --into reports
Downloads reports/january.csv from S3 to reports/january.csv locally, keeping subfolders.
Here s3 is an rclone S3 remote. Unrelated local files stay.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone copy --links --create-empty-src-dirs s3:backups/reports reports
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Rclone stores source modification times in S3 metadata named mtime; syq uses syq-mtime and syq-mtime-nsec. Each tool restores its own timestamp format; one tool’s upload does not give the other the same source-time information.
Rclone --links restores its .rclonelink objects as local symlinks. Syq restores objects carrying syq’s symlink metadata. Neither decodes the other format.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Copy a file between S3 buckets
rclone
rclone copyto s3:backups/report.csv s3:archive/report.csv
syq
syq cp --from s3://backups report.csv --to s3://archive --as report.csv
Copies report.csv from bucket backups to bucket archive.
Here s3 is an rclone S3 remote. Both buckets must exist on the same S3 service for this syq example.
Differences
Rclone’s default skip decision uses size and modification time, with a hash comparison when times differ. Syq checks object type, size and copyable metadata, then compares full-object checksums when available; otherwise, it accepts matching ETags or a source carrying syq metadata. These tests can make different decisions about whether to copy an existing object.
Preview a copy
rclone
rclone copy --dry-run project backup
syq
syq cp --dry-run -v --srcs-in project --into backup
Previews copying the contents of project into backup.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone copy --dry-run --links --create-empty-src-dirs project backup
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Rename a file while copying
rclone
rclone copyto report.csv latest.csv
syq
syq cp report.csv --as latest.csv
Copies report.csv to latest.csv in your current directory; the source stays.
Differences
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Remove a file
rclone
rclone deletefile s3:backups/old.csv
syq
syq rm --on s3://backups old.csv
Removes the object old.csv from bucket backups.
Here s3 is an rclone S3 remote.
Send a folder to a server
rclone
rclone copy project server:/backup/project
syq
syq cp project --to server --into /backup
Copies project to /backup/project on the server.
Configure server as an rclone SFTP remote.
Differences
The command above does not request empty-directory or symlink preservation. For a closer match:
rclone copy --links --create-empty-src-dirs project server:/backup/project
--create-empty-src-dirs includes empty directories. --links preserves symlinks through rclone’s link representation, restoring real links on a local destination.
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Rclone --links uploads a symlink as a text file with a .rclonelink suffix. Syq keeps the original name: as a real link on an SSH server, or an object marked as a symlink in S3.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Download a file from a server
rclone
rclone copyto server:/data/report.csv report.csv
syq
syq cp --from server /data/report.csv --into .
Downloads report.csv into your current folder.
Here server is an rclone SFTP remote.
Differences
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
Choose destination names with a script
A script chooses beach.jpg for a.jpg and summit.jpg for b.jpg.
rclone
rclone copyto photos/a.jpg archive/beach.jpg
rclone copyto photos/b.jpg archive/summit.jpg
syq
files.ndjson
{"src":{"encoding":"utf-8","value":"a.jpg"},"dst":{"encoding":"utf-8","value":"beach.jpg"}}
{"src":{"encoding":"utf-8","value":"b.jpg"},"dst":{"encoding":"utf-8","value":"summit.jpg"}}
syq cp --mapping files.ndjson -C photos --into archive
Generate a mapping with a script.
Differences
When sizes match but modification times differ, rclone can compare available hashes and update only the timestamp if the contents match. Syq’s default unchanged-file check uses size and modification time, without that hash fallback.
Without --metadata, rclone does not restore source Unix permission bits. Syq gives new files the source read/write/execute bits limited by the destination umask and keeps existing destination permissions. Rclone’s --metadata would additionally restore ownership and other metadata, so it does not match syq’s default either.
These rclone commands run separately. Syq checks the complete mapping for duplicate destinations and file/ancestor conflicts before copying.
s5cmd
Copy a file
s5cmd
s5cmd cp report.csv s3://backups/reports/report.csv
syq
syq cp report.csv --to s3://backups --as reports/report.csv
Uploads report.csv to the exact key reports/report.csv in bucket backups.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
Download a folder from S3
s5cmd
s5cmd cp 's3://backups/reports/*' reports/
syq
syq cp --from s3://backups --srcs-in reports --into reports
Downloads reports/january.csv from S3 to reports/january.csv locally, keeping subfolders.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd downloads object bodies as regular files; it does not restore syq’s symlink or timestamp metadata. Syq recognizes that metadata and restores the original object type and modification time.
Copy a file between S3 buckets
s5cmd
s5cmd cp s3://backups/report.csv s3://archive/report.csv
syq
syq cp --from s3://backups report.csv --to s3://archive --as report.csv
Copies the key report.csv from bucket backups to bucket archive.
Both buckets must exist on the same S3 service for this example.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
Preview a copy
s5cmd
s5cmd --dry-run cp report.csv s3://backups/report.csv
syq
syq cp --dry-run -v report.csv --to s3://backups --as report.csv
Previews uploading report.csv without writing the object.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
Rename a file while copying
s5cmd
s5cmd cp report.csv s3://backups/latest.csv
syq
syq cp report.csv --to s3://backups --as latest.csv
Uploads report.csv as the key latest.csv; the local source stays.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
Remove a file
s5cmd
s5cmd rm s3://backups/old.csv
syq
syq rm --on s3://backups old.csv
Removes the object old.csv from bucket backups.
Upload a folder’s contents to S3
s5cmd
s5cmd cp project/ s3://backups/project/
syq
syq cp --srcs-in project --to s3://backups --into project
Uploads project/index.html to project/index.html in bucket backups.
Unrelated objects stay.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
S5cmd follows source symlinks and omits empty directories. Its --no-follow-symlinks skips links rather than preserving them. Syq stores symlinks and empty directories for restoration by syq.
Copy the files inside a folder
s5cmd
s5cmd cp project/ s3://backups/project/
syq
syq cp --srcs-in project --to s3://backups --into project
Copies the files inside project to the project/ folder in S3.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
S5cmd follows source symlinks and omits empty directories. Its --no-follow-symlinks skips links rather than preserving them. Syq stores symlinks and empty directories for restoration by syq.
Match a folder, deleting extra files
s5cmd
s5cmd sync --delete project/ s3://backups/project/
syq
syq cp --prune --srcs-in project --to s3://backups --into project
Updates the project/ folder in S3 and removes objects absent from the local project folder.
Differences
S5cmd sync copies when sizes differ or the source modification time is newer. Syq can also update a same-size destination whose modification time is newer than the source. For S3, s5cmd uses the object’s service timestamp; syq uses its stored source timestamp when present.
S5cmd runs its generated copy and removal commands concurrently. Syq waits for copying to finish and suppresses pruning after scan or copy errors.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
S5cmd follows source symlinks and omits empty directories. Its --no-follow-symlinks skips links rather than preserving them. Syq stores symlinks and empty directories for restoration by syq.
Choose destination names with a script
A script chooses beach.jpg for a.jpg and summit.jpg for b.jpg.
s5cmd
copies.txt
cp photos/a.jpg s3://backups/archive/beach.jpg
cp photos/b.jpg s3://backups/archive/summit.jpg
s5cmd run copies.txt
syq
files.ndjson
{"src":{"encoding":"utf-8","value":"a.jpg"},"dst":{"encoding":"utf-8","value":"beach.jpg"}}
{"src":{"encoding":"utf-8","value":"b.jpg"},"dst":{"encoding":"utf-8","value":"summit.jpg"}}
syq cp --mapping files.ndjson -C photos --to s3://backups --into archive
Generate a mapping with a script.
Differences
S5cmd cp copies selected files again even when the destination already matches. Syq can skip unchanged entries. S5cmd’s size-only and source-newer conditions do not reproduce syq’s default comparison.
S5cmd uploads regular file contents without automatically recording source Unix permissions or modification times. Syq records those in its S3 metadata and restores modification times on download.
S5cmd executes independent commands from copies.txt. Syq checks the entire mapping for duplicate destinations and file/ancestor conflicts before copying.
scp
Copy a file
scp
scp -p report.csv server:/backup/
syq
syq cp report.csv --to server --into /backup
Copies report.csv to /backup/report.csv on server.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
The scp destination directory must already exist for the placement shown. Syq creates missing destination directories.
Download a file from a server
scp
scp -p server:/data/report.csv .
syq
syq cp --from server /data/report.csv --into .
Copies the server’s /data/report.csv to report.csv in your current directory.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
Send a folder to a server
scp
scp -pr project server:/backup/
syq
syq cp project --to server --into /backup
Copies project to /backup/project.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
Scp follows symlinks inside the copied tree and copies their targets. Syq copies those links themselves.
The scp destination directory must already exist for the placement shown. Syq creates missing destination directories.
Rename a file while copying
scp
scp -p report.csv server:/backup/latest.csv
syq
syq cp report.csv --to server --as /backup/latest.csv
Copies report.csv to /backup/latest.csv; the source stays.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
The scp destination directory must already exist for the placement shown. Syq creates missing destination directories.
If a requested destination filename is already a directory, scp copies inside it. Syq refuses to replace that directory with a file.
Copy the files inside a folder
scp
scp -pr project/. server:/backup/
syq
syq cp --srcs-in project --to server --into /backup
Copies project’s contents, including hidden files and subfolders, into /backup.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
Scp follows symlinks inside the copied tree and copies their targets. Syq copies those links themselves.
The scp destination directory must already exist for the placement shown. Syq creates missing destination directories.
Choose destination names with a script
A script chooses beach.jpg for a.jpg and summit.jpg for b.jpg.
scp
scp -p photos/a.jpg server:/archive/beach.jpg
scp -p photos/b.jpg server:/archive/summit.jpg
syq
files.ndjson
{"src":{"encoding":"utf-8","value":"a.jpg"},"dst":{"encoding":"utf-8","value":"beach.jpg"}}
{"src":{"encoding":"utf-8","value":"b.jpg"},"dst":{"encoding":"utf-8","value":"summit.jpg"}}
syq cp --mapping files.ndjson -C photos --to server --into /archive
Generate a mapping with a script.
Differences
Scp -p preserves source permission bits and access times as well as modification times. Syq preserves modification times, leaves existing destination permissions alone, and creates files with source read/write/execute bits limited by the destination umask; it does not preserve source access times.
Scp transfers each file again and writes directly to the destination. Syq can skip unchanged files and normally stages changed files before replacing them, keeping the old file available until replacement.
The scp destination directory must already exist for the placement shown. Syq creates missing destination directories.
If a requested destination filename is already a directory, scp copies inside it. Syq refuses to replace that directory with a file.
These scp commands run separately. Syq checks the complete mapping for duplicate destinations and file/ancestor conflicts before copying.
syq
Copy a file
syq
syq cp report.csv --to server --into /backup
Copies report.csv to /backup/report.csv on server.
Replace server with your SSH host or alias.
Send a folder to a server
syq
syq cp project --to server --into /backup
Copies project to /backup/project. Other entries in /backup stay.
Copy the files inside a folder
syq
syq cp --srcs-in project --to server --into /backup
Copies project/index.html to /backup/index.html. Destination-only files stay.
Match a folder, deleting extra files
syq
syq cp --prune --srcs-in project --to server --into /backup
Updates /backup with the contents of project and removes destination entries absent from the source.
Download a file from a server
syq
syq cp --from server /data/report.csv --into .
Fetches report.csv into your current directory.
Run this on your laptop. The source path is on server.
Preview a copy
syq
syq cp --dry-run -v --srcs-in project --to server --into /backup
Lists planned changes without copying file data.
Rename a file while copying
syq
syq cp report.csv --to server --as /backup/latest.csv
Copies report.csv to /backup/latest.csv; the source stays.
Choose destination names with a script
A script chooses beach.jpg for a.jpg and summit.jpg for b.jpg.
syq
files.ndjson
{"src":{"encoding":"utf-8","value":"a.jpg"},"dst":{"encoding":"utf-8","value":"beach.jpg"}}
{"src":{"encoding":"utf-8","value":"b.jpg"},"dst":{"encoding":"utf-8","value":"summit.jpg"}}
syq cp --mapping files.ndjson -C photos --into archive
Upload a folder’s contents to S3
syq
syq cp --srcs-in project --to s3://backups --into project
Uploads project/index.html to project/index.html in bucket backups.
The backups bucket must already exist. Configure AWS credentials and any custom S3 endpoint.
Download a folder from S3
syq
syq cp --from s3://backups --srcs-in reports --into reports
Downloads reports/january.csv from S3 to reports/january.csv locally, keeping subfolders.
Copy a file between S3 buckets
syq
syq cp --from s3://backups report.csv --to s3://archive --as report.csv
Copies report.csv from bucket backups to bucket archive.
Both buckets must exist on the same S3 service for this example.
Remove a file
syq
syq rm --on s3://backups old.csv
Removes the object old.csv from bucket backups.
Send from a server shell to a laptop with no SSH server
syq
# On the server:
syq cp results --to @laptop
Sends results home from the server shell. Your laptop needs no SSH server or incoming port.
Set up the receiving name laptop, then approve the copy on your laptop.
Alternatives that change the task
Rsync, scp, and rclone can pull from the laptop instead. S5cmd can stage files in S3.
Copy directly between servers without agent forwarding
syq
# On your laptop:
syq cp --from hostA --srcs-in results --to hostB --into results
Uses your laptop’s SSH logins. Files travel directly between servers; neither server gets your keys or access to your SSH agent.
The servers need a connection to each other. Setup.
Alternatives that change the task
Scp -3 and rclone relay through your laptop. Rsync on hostA or scp -R requires hostA to have its own access to hostB. S5cmd can stage files in S3.
Common tasks
| I want to… | Start here |
|---|---|
| Look up commands and options | Command reference |
| Choose exactly where files land | Copy and placement |
| Preview changes | Dry runs |
Skip build files or use .gitignore | Ignoring paths |
| Mirror a directory | Mirroring |
| Remove files in parallel | Removal |
| Send files to my laptop from a server’s shell | Receiving files |
| Run a build or open an artifact on my desktop from a server | Commands on your receiving machine |
| Copy between two servers | Remote-to-remote transfers |
| Rename or reorganize files during a copy | Mappings |
| Use syq from Python | Python SDK |
| Read results from a script | Automation results |
| Make copies faster | Speed |