Solved

Linux: Recursively copy all files except .zip files

Posted on 2016-09-27
2
55 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
ID: 41818529
From the directory you want to copy:
find . ! -name "*.zip" | cpio -pdm ../destinationdir

Open in new window

0
 
LVL 8

Expert Comment

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

Featured Post

Complete VMware vSphere® ESX(i) & Hyper-V Backup

Capture your entire system, including the host, with patented disk imaging integrated with VMware VADP / Microsoft VSS and RCT. RTOs is as low as 15 seconds with Acronis Active Restore™. You can enjoy unlimited P2V/V2V migrations from any source (even from a different hypervisor)

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
Over the last ten+ years I have seen Linux configuration tools come and go. In the early days there was the tried-and-true, all-powerful linuxconf that many thought would remain the one and only Linux configuration tool until the end of times. Well,…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

910 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

21 Experts available now in Live!

Get 1:1 Help Now