LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 10-23-2013, 06:25 PM   #1
kenp11
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Rep: Reputation: Disabled
Unable to zip file without full directory 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 kenp11; 10-23-2013 at 07:44 PM.
 
Old 10-23-2013, 06:47 PM   #2
Firerat
Senior Member
 
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

Rep: Reputation: 444Reputation: 444Reputation: 444Reputation: 444Reputation: 444
use tar,,

Code:
ssh rlinuxbuilduser@prd64db tar -cjf //foothill/Applications/FoundationRelease/Deltek/InstallDirectory.tar.bz2 -C //foothill/Applications/FoundationRelease/Deltek/ InstallDirectory
note the space after Deltek/
-C is change dir

more details, read tar manpage

now, if you insist on zip

Code:
ssh rlinuxbuilduser@prd64db "cd //foothill/Applications/FoundationRelease/Deltek/;zip -r InstallDirectory.zip InstallDirectory"
And in future, please use code tags

[code]
Your code here
[/code]
 
Old 10-23-2013, 07:44 PM   #3
kenp11
LQ Newbie
 
Registered: Oct 2013
Posts: 2

Original Poster
Rep: Reputation: Disabled
Thanks. That worked great. And i added the code markup
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
eval $PATH produces a path list followed by No such file or directory warning Alpha90 Linux - Newbie 10 11-04-2012 11:16 AM
Configuring GNOME to have Full File Path Text Fields in File Open Dialog Boxes bgoodr Linux - Desktop 3 11-29-2011 10:07 AM
[SOLVED] Linux zip, excluding whole directory path SirLouen Linux - Software 1 09-12-2010 04:40 PM
how to add a file to a zip, without including the entire path from root marvelade Linux - Newbie 6 02-19-2009 06:32 AM
command to show full directory path cuco76 Linux - Newbie 2 10-12-2006 09:36 PM


All times are GMT -5. The time now is 04:24 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration