LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-26-2015, 05:54 AM   #1
Zaress
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Rep: Reputation: Disabled
Lightbulb Zip a folder


Hi all,

Noob question:

I have this file structure:

blogs php.ini wp-admin wp-content wp-login.php xmlrpc.php
ea readme.html wp-blog-header.php wp-cron.php wp-mail.php
filter.php tmp wp-comments-post.php wp-includes wp-settings.php
index.php wc-logs wp-config-sample.php wp-links-opml.php wp-signup.php
license.txt wp-activate.php wp-config.php wp-load.php wp-trackback.php

How can i archive all the files except /ea & .blog directory?

Thank you in advance!
 
Old 10-26-2015, 06:02 AM   #2
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Hello!

It is very hard to understand the structure of your directories and files based on your post. Regardless, here is a link that I think you may find helpful regarding excluding files from a zip archive:
http://stackoverflow.com/questions/1...-in-linux-unix

Best regards,
HMW
 
Old 10-26-2015, 06:11 AM   #3
Zaress
LQ Newbie
 
Registered: Oct 2015
Posts: 2

Original Poster
Rep: Reputation: Disabled
I found it.
I used: tar -zcvf bkp.tar.gz * --exclude='dir1' --exclude='dir2'

Please close the topic!
 
Old 10-26-2015, 06:56 AM   #4
maples
Member
 
Registered: Oct 2013
Location: IN, USA
Distribution: Arch, Debian Jessie
Posts: 814

Rep: Reputation: 265Reputation: 265Reputation: 265
Quote:
Originally Posted by Zaress View Post
I found it.
I used: tar -zcvf bkp.tar.gz * --exclude='dir1' --exclude='dir2'

Please close the topic!
At the top of the page, look for "Thread Tools". Around there, there should be an option to "Mark this thread as SOLVED". Just click that.
 
Old 10-26-2015, 08:05 AM   #5
HMW
Member
 
Registered: Aug 2013
Location: Sweden
Distribution: Debian, Arch, Red Hat, CentOS
Posts: 773
Blog Entries: 3

Rep: Reputation: 369Reputation: 369Reputation: 369Reputation: 369
Quote:
Originally Posted by Zaress View Post
I found it.
I used: tar -zcvf bkp.tar.gz * --exclude='dir1' --exclude='dir2'

Please close the topic!
Awesome! It is always great to be able to solve one's own stuff.

Please note that tar and zip are two different programs, and you asked for help with zip.

Best regards,
HMW
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
change tar.gz folder to zip folder umucar Linux - Desktop 3 09-09-2014 07:19 AM
Compress folder to Zip file makan007 Red Hat 1 09-05-2006 04:27 AM
how to zip a folder as tar.gz Dakkar Linux - General 2 01-09-2006 11:51 AM
zip folder tjgadu Linux - Newbie 1 06-17-2005 02:31 AM
zip a folder tjgadu Linux - Newbie 1 06-03-2005 02:00 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 12:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration