You could call zip one more time, without the -j flag, to add that directory:
This won't work as $myDir is in a form of "/var/www/customers/myaccount" so also this path will be included into the zip file.
So what I need is create a ZIP file of a remote diretory's contents so that also the META-INF folder will be included into the zip file but the parent folder structure is omitted.
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)
Hello forum members,
I have to create a out file in the current path./aaa/bbb/ccc/hhh.
i am writing script below.
###script Begins#####
#!/bin/ksh
echo "Weclome"
if
then
echo "Hello"
rm -rf $aaa/bbb/ccc/hhh #clean the exsisting o/p file
echo "no... (2 Replies)
hi,
i want to create a dummy file even if the path to that file is not exist as follows.
suppose, in my working directory 2 files are there. and
i create one more file which is exist as follows
# pwd
/home/satya
# ls
file1.txt file2.txt
# echo dummy > /home/satya/file3.txt
# ls... (3 Replies)
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)
Im fairly new to bash but I wanted to know about an idea I had to stream my file process these days. I modify .html, and .xml files and usually will take the files right click, create .zip, add files, rename, and cut the zip out of the folder and paste into another folder. I KNOW bash should be... (13 Replies)
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... (2 Replies)
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (2 Replies)
Hi all i am very new to shell scripting and need some help from you to learn
1)i have some log files that gets generated on daily basis example: i have abc_2017_01_30_1.log ,2017_01_30_2.log like wise so i want to zip this 4 logs which are created on same date into one zip folder.
2)Post zipping... (1 Reply)
I want to zip up my fstab file for backup purposes.
This does not work because of permission issues.
cd /etc/
zip -u fstab.zip fstab
Can I use this with zip?
echo xxx | sudo -S
or change fstab owner to me? (3 Replies)