Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6136665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T17:37:51+00:00 2026-05-23T17:37:51+00:00

Here is the directory structure of the folder I am trying to archive: DIR

  • 0

Here is the directory structure of the folder I am trying to archive:

DIR STRUCTURE

HOME
HOME/.abc
HOME/FIRST
HOME/FIRST/.def

I am using simlpe $PATCH/zip -r -l -x "bac*" abc.zip HOME/*

One interesting thing I obseverved was it is skipping hidden folder directly under HOME and it zips the one under FIRST. What am I missing here? Is it any side effect of the options I am chosing ? Please help thanks in advance.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-23T17:37:51+00:00Added an answer on May 23, 2026 at 5:37 pm

    * is not interpreted by the zip utility, but rather expanded by the shell. Before the zip utility is executed, * is replaced by a space separated list of all the non-hidden files or directories.

    You can prove this by replacing $PATCH/zip with echo, which will show the arguments that are actually passed to the program, after shell mangling.


    If you set the environment variable GLOBIGNORE to .:.., not only will bash disable the matching of . and .., it has the nice effect of also automatically enabling ‘dotglob’, which matches the other hidden files without the need for .*, so you can just use * for everything.

    For example, this should solve your problem:

    GLOBIGNORE=.:..; $PATCH/zip -r -l -x "bac*" abc.zip HOME/*; unset GLOBIGNORE
    

    Note that you cannot do this the short way, or in one command:

    GLOBIGNORE=.:.. $PATCH/zip -r -l -x "bac*" abc.zip HOME/*
    

    It seems that bash doesn’t notice this until the next command.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

here is my directory structure. /user/a /user/b /user/b inside folder a,b,c there is a
I'm having trouble adding Facebook Connect to my iPhone Project. Here's the directory structure:
Update : Here is the project. I have the following directory structure: RMI |
Here is my try : #!/Usr/bin/emacs --script (let ((default-directory /home/vision)) (shell-command git pull;) but
I am trying to get an HTML-based recursive directory listing based on code here:
Here's the folder structure of my project: /ping --/Controller ----Ping_Conntroller_Main.php ----Ping_Conntroller_Db.php --/Model ----dbCredentials.php --/View
i want to move_uploaded files a folder back in my server directory structure but
I'm trying to do a document classification using Weka java API. Here is my
I'm trying to create an FTP script that will copy a local folder structure
I'm trying to zip up the artifacts of a rake build, using Albacore's ZipTask

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.