Skip to content
View in the app

A better way to browse. Learn more.

Thailand News and Discussion Forum | ASEANNOW

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Help Need An Archive Manager Or Cli Unzipper

Featured Replies

i have about 6000 zip files i need to unzip but must

ignore any paths stored in the archive and unzip into the current directory

ignore any errors in the zip file and skip it

i could do this in winrar but file roller which comes with ubuntu is no good and the unzip command does not seem powerful enough - please correct me if i am wrong

anyone have any suggestions

many thanks

PastEgo

You're looking for the 'unzip' command. The "-j" option will move all the files into the root directory.

I'd suggest doing a

 unzip -j *.zip ~/Desktop/zip

Note that I can't see a way to avoid it choking on errors, but it will tell you the problems and you can remove the offending files.

  • Author

great the problem is that a large number of files have nested sub directories within which i dont want i just want the file itself that is stored in there

will the -j do that

thanks again

PastEgo

great the problem is that a large number of files have nested sub directories within which i dont want i just want the file itself that is stored in there

will the -j do that

thanks again

PastEgo

from the unzip manual page

		[-x xfile(s)]
		   An  optional  list of archive members to be excluded from processing.  Since wildcard charac‐
		   ters normally match ('/') directory separators (for exceptions see the option -W, this option
		   may be used to exclude any files that are in subdirectories.  For example, ''unzip foo *.[ch]
		   -x */*'' would extract all C source files in the main directory, but none in any  subdirecto‐
		   ries.   Without the -x option, all C source files in all directories within the zipfile would
		   be extracted.

so I would expect that

 unzip filename.zip -x */*

would do the trick.

If your zip files are in multiple directories as well you could say

 find . -type f -name \*.zip -print -exec unzip {} -x "*/*" \;

to find all .zip files starting from current directory and unzip all of them to the current directory. Only files in the root directory inside of the zip files will be extracted.

HTH :)

errh, I mis-read the question, I thought you wanted all the subfiles dumped also.

  • Author

worked

you need to do unzip -j '*.zip' ../extract

I'm right occasionally!

Oh, and 24 more posts till the I break the 2000 mark.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.