07-02-2012
Zip all the files including directories - subdirectories
Hi,
Is is possible to zip a folder and all its contents within the folder ( including sub-directories and files) into a zip file? and can regain the same structure if unzipped?
Thanks
10 More Discussions You Might Find Interesting
1. UNIX for Dummies Questions & Answers
Is there a way to grep a word pattern in all files under all subdirectories?
Similar question with rm. To remove files with certain extension in all subdirectories?
Thanks to all who reply! (1 Reply)
Discussion started by: annej33
1 Replies
2. Shell Programming and Scripting
Hi,
How to recursively remove Ctrl M characters in files from a directory and its sub directory ?
I know unix2dos command is there but to remove in bunch of files ... ?
Thanks (7 Replies)
Discussion started by: skdp
7 Replies
3. UNIX for Dummies Questions & Answers
Hi,
I have a folder that contains a few sub-folders. I would like to zip that folder and KEEP the subfolders. What it does at the moment is taking all the files within the subfolders and zipping them into one big file (zip -r ...). Does anyone know the UNIX command to keep the subfolders in the... (3 Replies)
Discussion started by: gdog
3 Replies
4. UNIX for Dummies Questions & Answers
Hi guys,
I'm trying to do the following:
zip -r /tmp/foo.zip public/accounts/foo
But the zip that's been made has the whole "public/accounts/foo" path. I want only the foo folder to be zipped. How can I do this? Thanks,
Elías (2 Replies)
Discussion started by: elioncho
2 Replies
5. UNIX for Dummies Questions & Answers
I have 2 directories I want to compare for like files. One directory has 2 subdirectories associated with it, the other directory does not. When I do the dircmp -s I should get only a few files different between the two directories. I do, but the directory with subdirectories prints out all these... (3 Replies)
Discussion started by: MissI
3 Replies
6. UNIX for Dummies Questions & Answers
Hi,
I want to untar all log files from following tarred directory hierarchy
Log_files.tar.gz/subject*.tar.gz/project*/*.log
It means there are subject1.tar.gz to subject9.tar.gz and in those tarred subect directories there are project1 - project5 directories and in those directories there... (2 Replies)
Discussion started by: rv_trojan
2 Replies
7. UNIX for Dummies Questions & Answers
Hi!
I am trying to find all text files in my home directory that contain the string "C-d" so I tyied this :
cd ~
find . -type f -exec grep -l "C-d" {} +
but it took very long so I tryed this :
ls -aR | xargs file |grep text
but it didn't descend in the directories and it said :... (3 Replies)
Discussion started by: kelamahim
3 Replies
8. Shell Programming and Scripting
Does anyone know of a way to zip the resulting file from a find command?
My approach below finds the file and zips the entire directory path, which is not what I need.
After scanning the web, it seems to be much easier to perform gzip, but unfortunately the approach must use zip.
find `$DIR`... (5 Replies)
Discussion started by: koeji
5 Replies
9. Shell Programming and Scripting
Hi frnds,
My requirement is I have a zip file with name say eg: test_ABC_UH_ccde2a_awdeaea_20150422.zip
within that there are subdirectories on each directory we again have .zip files and in that we have files like mama20150422.gz and so on.
Iam in need of a bash script so that it unzips... (0 Replies)
Discussion started by: Ravi Kishore
0 Replies
10. Shell Programming and Scripting
Hii,
Could someone help me to append string to the starting of all the filenames inside a directory but it should exclude .zip files and subdirectories.
Eg.
file1: test1.log
file2: test2.log
file3 test.zip
After running the script
file1: string_test1.log
file2: string_test2.log
file3:... (4 Replies)
Discussion started by: Ravi Kishore
4 Replies
LEARN ABOUT MOJAVE
zipdetails5.18
ZIPDETAILS(1) Perl Programmers Reference Guide ZIPDETAILS(1)
NAME
zipdetails - display the internal structure of zip files
SYNOPSIS
zipdetaile [-v] zipfile.zip
zipdetails -h
DESCRIPTION
Zipdetails displays information about the internal record structure of the zip file. It is not concerned with displaying any details of the
compressed data stored in the zip file.
The program assumes prior understanding of the internal structure of a Zip file. You should have a copy of the Zip APPNOTE file at hand to
help understand the output from this program ("SEE ALSO" for details).
OPTIONS
-v Enable Verbose mode
-h Display help
By default zipdetails will output the details of the zip file in three columns.
Column 1
This contains the offset from the start of the file in hex.
Column 2
This contains a textual description of the field.
Column 3
If the field contains a numeric value it will be displayed in hex. Zip stored most numbers in little-endian format - the value
displayed will have the little-endian encoding removed.
Next, is an optional description of what the value means.
If the "-v" option is present, column 1 is expanded to include
o The offset from the start of the file in hex.
o The length of the filed in hex.
o A hex dump of the bytes in field in the order they are stored in the zip file.
TODO
Error handling is still a work in progress. If the program encounters a problem reading a zip file it is likely to terminate with an
unhelpful error message.
SEE ALSO
The primary reference for Zip files is the "appnote" document available at <http://www.pkware.com/documents/casestudies/APPNOTE.TXT>.
An alternative is the Info-Zip appnote. This is available from <ftp://ftp.info-zip.org/pub/infozip/doc/>
The "zipinfo" program that comes with the info-zip distribution (<http://www.info-zip.org/>) can also display details of the structure of a
zip file.
See also IO::Compress::Zip, IO::Uncompress::Unzip.
AUTHOR
Paul Marquess pmqs@cpan.org.
COPYRIGHT
Copyright (c) 2011-2012 Paul Marquess. All rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
perl v5.18.2 2018-08-17 ZIPDETAILS(1)