← All commands
Topic hub File Management
Windows Linux File Management File System

Windows xcopy equivalent in Linux

Copies directories with more control than cp — supports sync, progress display, resume, and remote copying.

Windows xcopy
Linux equivalents
Debian/Ubuntu same command
rsync -av
Fedora same command
rsync -av
Arch same command
rsync -av

Overview

What this command does

Copies directories with more control than cp — supports sync, progress display, resume, and remote copying.

Migration tip: rsync only copies changed files, making it far faster than xcopy for large backups. It can also copy over SSH to remote machines.

Practical tasks

Common use cases

Advanced copy with sync & progress

Copies directories with more control than cp — supports sync, progress display, resume, and remote copying.

rsync -av

Archive mode + verbose output

rsync --progress

Show per-file transfer progress

rsync --delete

Delete files in dest not in source (true sync)

Ready to run

Copyable Linux commands

Review paths, device names, package names and permissions before running any command.

rsync -av Source/ Dest/
rsync -av --progress Source/ Dest/
rsync -av --delete Source/ Dest/
rsync -avz ~/Documents/ user@server:/backup/

Walkthrough

Examples with explanations

# Windows: xcopy /s /e /i Source Dest
rsync -av Source/ Dest/              # copy directory
rsync -av --progress Source/ Dest/   # show progress

# Sync (delete files removed from source):
rsync -av --delete Source/ Dest/    # mirror source to dest

# Backup to a remote server over SSH:
rsync -avz ~/Documents/ user@server:/backup/

Reference

Common options and variations

Command or optionUse
rsync -avArchive mode + verbose output
rsync --progressShow per-file transfer progress
rsync --deleteDelete files in dest not in source (true sync)
rsync -nDry run — preview without copying
rsync -avzCompress data during transfer

Distro differences

Debian/Ubuntu vs Fedora vs Arch

This command is the same on Debian/Ubuntu, Fedora and Arch Linux when the relevant tool is installed.

DistributionPackage manager / baseEquivalent commandDifference to notice
Debian/Ubuntu same command rsync -av Same command on this distribution.
Fedora same command rsync -av Same command on this distribution.
Arch same command rsync -av Same command on this distribution.

Important

What to watch out for

Note the trailing slash: 'rsync -av src/ dest/' copies the *contents* of src. Without the slash, it copies the folder itself inside dest.

Keep learning

Related File Management commands