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 OPENSOLARIS
file-roller
file-roller(1) User Commands file-roller(1)
NAME
file-roller - create, view, modify, or unpack an archive
SYNOPSIS
file-roller [--add] [--add-to=archive] [--default-dir=folder] [--extract] [--extract-here] [--extract-to=folder] [--force] [gnome-std-
options]
DESCRIPTION
The File Roller application enables you to create, view, modify, or unpack an archive. An archive is a file that acts as a container for
other files. An archive can contain many files, folders, and subfolders, usually in compressed form.
OPTIONS
The following options are supported:
-d, --add Ask for the name of the archive, then add the files, then quit the application.
-a, --add-to=archive Add files to the specified archive, then quit the application.
--default-dir=folder Specify the default folder for the --add and --extract options.
-f, --extract Ask for the name of the destination folder, then extract the files, then quit the application.
-h, --extract-here Extract archives using the archive name as destination folder and quit the program.
-e, --extract-to=folder Extract archives to the specified folder, then quit the application.
--force Create the destination folder without asking for confirmation.
gnome-std-options Standard options available for use with most GNOME applications. See gnome-std-options(5) for more infor-
mation.
EXAMPLES
Example 1: Unpacking an Archive
example% file-roller --extract archive
EXIT STATUS
The following exit values are returned:
0 Application exited successfully
>0 Application exited with failure
FILES
The following files are used by this application:
/usr/bin/file-roller Executable for File Roller application.
ATTRIBUTES
See attributes(5) for descriptions of the following attributes:
+-----------------------------+-----------------------------+
| ATTRIBUTE TYPE | ATTRIBUTE VALUE |
+-----------------------------+-----------------------------+
|Availability |SUNW |
+-----------------------------+-----------------------------+
|Interface stability |Volatile |
+-----------------------------+-----------------------------+
SEE ALSO
File Roller Manual
ar(1), tar(1), unzip(1), zip(1), attributes(5), gnome-std-options(5)
NOTES
Written by Laszlo Kovacs, Sun Microsystems Inc., 2003, 2004, 2007.
SunOS 5.11 08 Nov 2007 file-roller(1)