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 8940823
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T11:08:36+00:00 2026-06-15T11:08:36+00:00

Suppose I have a folder named abc, it has several sub folders recursively, I

  • 0

Suppose I have a folder named abc, it has several sub folders recursively, I want to zip everything under abc, when I use the following command

zip -r abc.zip abc/*

I get abc.zip, but it contains the top level folder abc, and everything is under abc, like abc/xxx, abc/yyy etc, How can I remove the top level folder abc? I want to put everything directly in abc.zip.

Note:

  1. I can only zip from outside of the folder, so navigate to folder abc, and zip * is not work for me
  2. I need to run this command in a single line, I can separated multiple commands by ;
  3. option -j also does not work, since it remove the sub folders, I want to keep them there.
  • 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-06-15T11:08:38+00:00Added an answer on June 15, 2026 at 11:08 am
    cd abc
    zip -r ../abc.zip *

    Though I will say in most cases keeping it abc makes for easier management.

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

Sidebar

Related Questions

In the /data directory of solr, suppose, I have three folders named as index,
Suppose we have 2 sprite folders inside the img folder of a standard Compass
Suppose I have the following string in php: somedirectory/abc/morethings/[folder name] How can I parse
I have a folders containing a bunch of scripts. Suppose the folder is at
Suppose i have one folder and inside that another two files are there .
Suppose I have the following (desired) folder structure: *CommonProject *Project#1 ----> CommonProject(link) *Project#2 ---->
Suppose I have the following directory structure in Vim's NERDTree: /some/folder/ |-apples.txt |-bananas.txt |-
For instance, I suppose I have a directory that contains the following folders foo_bar
suppose I have package J moreover I create a new folder in J hence
I have three zipped folders named [1,2,3] each contains the same project 1 being

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.