Solved

Linux: Recursively copy all files except .zip files

Posted on 2016-09-27
2
48 Views
Last Modified: 2016-11-10
From a Linux command line, how can I recursively copy all files including directory structures, except .zip files?
0
Comment
Question by:skij
2 Comments
 
LVL 35

Accepted Solution

by:
Terry Woods earned 500 total points
Comment Utility
From the directory you want to copy:
find . ! -name "*.zip" | cpio -pdm ../destinationdir

Open in new window

0
 
LVL 8

Expert Comment

by:jako
Comment Utility
also,
rsync -a --exclude=*.zip /sourcedir /destinationdir
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

How many times have you wanted to quickly do the same thing to a list but found yourself typing it again and again? I first figured out a small time saver with the up arrow to recall the last command but that can only get you so far if you have a bi…
The purpose of this article is to demonstrate how we can use conditional statements using Python.
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

6 Experts available now in Live!

Get 1:1 Help Now