Linux & shell: Archives & copying
4 Linux & shell commands: Archives & copying. Click a command to see what each part does.
Linux & shell: Archives & copyingIndex
- Whole sheet251
- Navigate & list13
- Create, copy, move, delete13
- View & compare files9
- Permissions & ownership31
- Help & shell basics11
- Users & groups6
- Install packages7
- Package & software versions29
- System info9
- Network basics & SSH10
- Zip & compress4
- Shell operators6
- Processes6
- Files & search8
- Text processing pipelines4
- Disk3
- Network5
- Services & logs6
- Archives & copying4
- Firewall7
- Scheduling: cron & systemd timers6
- Storage, mounts & LVM10
- Kernel, hardware & limits8
- Performance & tracing10
- TLS & certificates8
- Packet capture & network debugging10
- Terminal tools8
Archives & copying4
tar -czvf <name>.tar.gz <dir>Create a gzip tarballWhat each part does
-ccreate an archive-zcompress with gzip-vlist files as they are added-f <name>.tar.gzarchive file name (must come right after f)
tar -xzvf <name>.tar.gz -C <dest>Extract a tarball into a folderWhat each part does
-xextract-z -v -fgzip, verbose, archive file-C <dest>change to <dest> before extracting
rsync -avzn --delete <src>/ <user>@<host>:<dest>/Sync a folder to a server (preview first)CautionWhat each part does
-aarchive mode: recursive, keep permissions, times, owner, symlinks-vverbose-zcompress during transfer-ndry run: show what would change. Remove it to really sync--deletedelete files on the destination that are not in the source<src>/trailing slash = copy the folder’s contents, not the folder itself
scp -r -P <port> <src> <user>@<host>:<path>Copy a folder to a server over SSHWhat each part does
-rcopy directories recursively-P <port>SSH port (capital P; lowercase -p means preserve times)<user>@<host>:<path>remote destination
Nothing matches.
My DevOps Playbook by Angelo John Calleja