Unable to ZIP without path


 
Thread Tools Search this Thread
Operating Systems Linux Unable to ZIP without path
# 1  
Old 10-23-2013
Unable to ZIP without path

We have been trying to zip a file with a Jenkins linux build server with a network path. We were trying use the different options for zip.
We either get the full directory path with zip -r option or no directory with zip -j
We need just the main path without the network path:example: /Documents & /InstallDirectory
Here are the commands we used in shell:
Note: using zip -j creates a zip with a full directory path & no files

Code:
ssh rlinuxbuilduser@prd64db zip -rj //foothill/Applications/FoundationRelease/Deltek/InstallDirectory.zip //foothill/Applications/FoundationRelease/Deltek/InstallDirectory

Code:
ssh rlinuxbuilduser@prd64db zip -r //foothill/Applications/FoundationRelease/Deltek/InstallDirectory.zip //foothill/Applications/FoundationRelease/Deltek/InstallDirectory


What are we doing wrong?

Last edited by Don Cragun; 10-23-2013 at 07:56 PM.. Reason: Add CODE tags.
# 2  
Old 10-24-2013
I know tar will use absolute paths and imagine zip does the same. That is:
Code:
zip  myproject.zip /home/myuname/myproject

will hard-code /home/myuname/project into the path of every item in myprojce.zip.

If you were not using ssh I would suggest this:
Code:
(cd //foothill/Applications/FoundationRelease/Deltek; zip -r InstallDirectory.zip InstallDirectory)

This should produce a zip file where items will unzip into local directory InstallDirectory.

You could try:
Code:
ssh rlinuxbuilduser@prd64db (cd //foothill/Applications/FoundationRelease/Deltek; zip -r InstallDirectory.zip InstallDirectory)

but I have no idea whether that will work.

Andrew
# 3  
Old 10-24-2013
Unable to ZIP without path

Yes it worked but without (), quotes had to be used instead "...."
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Shell Programming and Scripting

Unable to zip the files

I am getting below error: zip error: Nothing to do! (try: zip -rq <zip_name> . -i <file_list>) if ( ! $_2_zip_dirs eq "" ) { $OS->print ("$zip -rq $zip2 $_2_zip_dirs\n"); $OS->execute ("$zip -rq $zip2 $_2_zip_dirs"); if ( ! -e $zip2 ) { ... (2 Replies)
Discussion started by: ambarginni
2 Replies

2. Shell Programming and Scripting

Unable to set PATH through ksh shell

I'm trying to set path for the current session but it is not doing so. It works perfectly on command line though. #!/usr/bin/ksh PATH=$PATH:/opt/quest/bin Is there any specific way to set path on korn? (3 Replies)
Discussion started by: pjeedu2247
3 Replies

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

4. Shell Programming and Scripting

Unable to set my PATH variable

Hello All, Hope you can understand my problem from the below code. $ cat ~/.profile PS1=`whoami`@`hostname`':$PWD $ ' export PATH="$PATH:.:/logarchive/utility/util:/usr/sbin:" $ echo $PATH /usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:.:/usr/sbin: $ echo $SHELL /usr/bin/ksh ... (6 Replies)
Discussion started by: sathyaonnuix
6 Replies

5. Shell Programming and Scripting

Find file and zip without including directory path

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

6. Shell Programming and Scripting

File creating in another path.. application unable to locate

I am submitting a concurrent program (of HOST tyme) from Oracle apps screen, The MAIN shell program submits another program, (child) which is also a Shell program. The child writes data to log file. Now the main program, read the log and do some calculations and sends the data to user through... (1 Reply)
Discussion started by: Pradeep Garine
1 Replies

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

8. Solaris

Solaris 9 -- unable to set permanent PATH

Hi, I've read forums far and wide trying to learn how to append to my PATH in Solaris 9 and every time I think I am close I discover my system is not configured the same. Its so frustrating because this all stems from a new server I am trying to setup identical to the production machine. (Of... (5 Replies)
Discussion started by: thoraddict
5 Replies

9. Windows & DOS: Issues & Discussions

How can I upload a zip folder on a unix path from my windows folder?

Hello, I am an amature at UNIX commands and functionality. Please could you all assist me by replying to my below mentioned querry : How can I upload a zip folder on a unix path from my windows folder? Thanks guys Cheers (2 Replies)
Discussion started by: ajit.yadav83
2 Replies

10. Shell Programming and Scripting

Get zip path from unzip -l

I am listing the contents of a zip file and then grepping for a specific string ie: filename.a to get a line like: 309753 10-18-08 15:20 etc/filename.a The etc/filename.a is the path the file is at within the zip file...how might I capture this path as I want to use that path to unzip that... (2 Replies)
Discussion started by: phreezr
2 Replies
Login or Register to Ask a Question