Sponsored Content
Top Forums Shell Programming and Scripting Find file and zip without including directory path Post 302702857 by koeji on Wednesday 19th of September 2012 02:04:57 AM
Old 09-19-2012
While it does now zip by explicitly providing the directory path, when I unzip the file again as a check, I get ./path/to/directory/CONTACTS_1.txt. I should also mention that $DIR is in a different directory than from where the script is run.
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

find directory not including current

Using Solaris 8, I've forgotten how to exclude the current directory in the find results. find . -type d ! -name "*.CAP" I want every directory that does not match the *.CAP pattern, except the current directory. (2 Replies)
Discussion started by: dangral
2 Replies

2. Shell Programming and Scripting

Reading a path (including ref to shell variable) from file

Hi! 1. I have a parameter file containing path to log files. For this example both paths are the same, one is stated directly and the second using env variables. /oracle/admin/orcl/bdump/:atlas:trc:N ${ORACLE_BASE}/admin/${ORACLE_SID}/bdump/:${ORACLE_SID}:trc:N 2. I try to parse the path... (1 Reply)
Discussion started by: lojzev
1 Replies

3. UNIX for Dummies Questions & Answers

Zip a folder including its sub-folders.

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

Create zip without including directories

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. Linux

How to create zip file without path?

Hello, I have generated a PHP script that creates files needed for EPUB file. I have a temp directory where these files are created into and then needs to be zipped. The directory structure is: mimetype content.opf index.html stylesheet.css toc.ncx META-INF META-INF/container.xml ... (4 Replies)
Discussion started by: spaze
4 Replies

6. UNIX for Advanced & Expert Users

Find exact path of a file/directory

Hello Folks, A wrapper takes an argument of file or directory name. I want to allow paths that reside within the current directory only. Can simply discard the paths like "/A" & "../" as they go outside the current by looking at the path beginning. How to validate this one: A/../../../b... (4 Replies)
Discussion started by: vibhor_agarwali
4 Replies

7. Shell Programming and Scripting

Find all the files under a specific directory and zip them into a single file.

Hi, Is there a way to find all the files from a specific location and then zip them into a single file, even if they are in multiple directories? (3 Replies)
Discussion started by: rudoraj
3 Replies

8. Shell Programming and Scripting

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 (6 Replies)
Discussion started by: rudoraj
6 Replies

9. Shell Programming and Scripting

Zip a file with path

zip /var/log/mylog.log mylog.1.log but its not working (5 Replies)
Discussion started by: Froob
5 Replies

10. UNIX for Beginners Questions & Answers

Convert Relative path to Absolute path, without changing directory to the file location.

Hello, I am creating a file with all the source folders included in my git branch, when i grep for the used source, i found source included as relative path instead of absolute path, how can convert relative path to absolute path without changing directory to that folder and using readlink -f ? ... (4 Replies)
Discussion started by: Sekhar419
4 Replies
zipcloak(1)						      General Commands Manual						       zipcloak(1)

NAME
zipcloak - encrypt entries in a zipfile SYNOPSIS
zipcloak [-d] [-b path] [-h] [-v] [-L] zipfile ARGUMENTS
zipfile Zipfile to encrypt entries in OPTIONS
-b path --temp-path path Use the directory given by path for the temporary zip file. -d --decrypt Decrypt encrypted entries (copy if given wrong password). -h --help Show a short help. -L --license Show software license. -O path --output-file zipfile Write output to new archive zipfile, leaving original archive as is. -q --quiet Quiet operation. Suppresses some informational messages. -v --version Show version information. DESCRIPTION
zipcloak encrypts all unencrypted entries in the zipfile. This is the default action. The -d option is used to decrypt encrypted entries in the zipfile. zipcloak uses original zip encryption which is considered weak. Note: The encryption code of this program is not copyrighted and is put in the public domain. It was originally written in Europe and can be freely distributed from any country including the U.S.A. (Previously if this program was imported into the U.S.A, it could not be re-exported from the U.S.A to another country.) See the file README.CR included in the source distribution for more on this. Otherwise, the Info-ZIP license applies. EXAMPLES
To be added. BUGS
Large files (> 2 GB) and large archives not yet supported. Split archives not yet supported. A work around is to convert the split archive to a single-file archive using zip and then use zipcloak on the single-file archive. If needed, the resulting archive can then be split again using zip. SEE ALSO
zip(1), unzip(1) AUTHOR
Info-ZIP v3.0 of 8 May 2008 zipcloak(1)
All times are GMT -4. The time now is 01:42 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy