Review your favorite Linux distribution.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
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!


  Search this Thread
Old 10-23-2013, 05:25 PM   #1
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
ssh rlinuxbuilduser@prd64db zip -rj //foothill/Applications/FoundationRelease/Deltek/ //foothill/Applications/FoundationRelease/Deltek/InstallDirectory
ssh rlinuxbuilduser@prd64db zip -r //foothill/Applications/FoundationRelease/Deltek/ //foothill/Applications/FoundationRelease/Deltek/InstallDirectory
What are we doing wrong?

Last edited by kenp11; 10-23-2013 at 06:44 PM.
Old 10-23-2013, 05:47 PM   #2
Senior Member
Registered: Oct 2008
Distribution: Debian Jessie / sid
Posts: 1,471

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

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

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

Your code here
Old 10-23-2013, 06:44 PM   #3
LQ Newbie
Registered: Oct 2013
Posts: 2

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


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 10:16 AM
Configuring GNOME to have Full File Path Text Fields in File Open Dialog Boxes bgoodr Linux - Desktop 3 11-29-2011 09:07 AM
[SOLVED] Linux zip, excluding whole directory path SirLouen Linux - Software 1 09-12-2010 03:40 PM
how to add a file to a zip, without including the entire path from root marvelade Linux - Newbie 6 02-19-2009 05:32 AM
command to show full directory path cuco76 Linux - Newbie 2 10-12-2006 08:36 PM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 09:39 PM.

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