Zip but do not scan excluded folder
Clash Royale CLAN TAG#URR8PPP
up vote
2
down vote
favorite
I am making a zip of a directory.
I used this command to exclude a certain folder
zip -r myzip.zip /home/test -x share/*
When I used this command it still scans through that folder. It has numerous subfolders so I don't want it to waste time scanning through everything even though I excluded it. It also throws a lot of zip warning: name not matched because it has numerous symbolic links.
Is there a way to zip without scanning through everything each time?
zip
add a comment |Â
up vote
2
down vote
favorite
I am making a zip of a directory.
I used this command to exclude a certain folder
zip -r myzip.zip /home/test -x share/*
When I used this command it still scans through that folder. It has numerous subfolders so I don't want it to waste time scanning through everything even though I excluded it. It also throws a lot of zip warning: name not matched because it has numerous symbolic links.
Is there a way to zip without scanning through everything each time?
zip
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
"I am making a zip of a directory." Does it have to bezip
? Or would you accept "I am making a backup of a directory"? Native tools includetar
orpax
, andgzip
orbzip2
.
â roaima
Jun 25 at 21:01
add a comment |Â
up vote
2
down vote
favorite
up vote
2
down vote
favorite
I am making a zip of a directory.
I used this command to exclude a certain folder
zip -r myzip.zip /home/test -x share/*
When I used this command it still scans through that folder. It has numerous subfolders so I don't want it to waste time scanning through everything even though I excluded it. It also throws a lot of zip warning: name not matched because it has numerous symbolic links.
Is there a way to zip without scanning through everything each time?
zip
I am making a zip of a directory.
I used this command to exclude a certain folder
zip -r myzip.zip /home/test -x share/*
When I used this command it still scans through that folder. It has numerous subfolders so I don't want it to waste time scanning through everything even though I excluded it. It also throws a lot of zip warning: name not matched because it has numerous symbolic links.
Is there a way to zip without scanning through everything each time?
zip
asked Jun 25 at 19:25
jimbob
132
132
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
"I am making a zip of a directory." Does it have to bezip
? Or would you accept "I am making a backup of a directory"? Native tools includetar
orpax
, andgzip
orbzip2
.
â roaima
Jun 25 at 21:01
add a comment |Â
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
"I am making a zip of a directory." Does it have to bezip
? Or would you accept "I am making a backup of a directory"? Native tools includetar
orpax
, andgzip
orbzip2
.
â roaima
Jun 25 at 21:01
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
"I am making a zip of a directory." Does it have to be
zip
? Or would you accept "I am making a backup of a directory"? Native tools include tar
or pax
, and gzip
or bzip2
.â roaima
Jun 25 at 21:01
"I am making a zip of a directory." Does it have to be
zip
? Or would you accept "I am making a backup of a directory"? Native tools include tar
or pax
, and gzip
or bzip2
.â roaima
Jun 25 at 21:01
add a comment |Â
2 Answers
2
active
oldest
votes
up vote
7
down vote
accepted
From man page:
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.
add a comment |Â
up vote
0
down vote
You will need to include the full path to the directory that you want to exclude. If it is inside of /home/test
:
zip -r myzip.zip /home/test -x /home/test/share/*
If it's elsewhere:
zip -r myzip.zip /home/test -x /home/test/path/to/share/*
add a comment |Â
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
7
down vote
accepted
From man page:
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.
add a comment |Â
up vote
7
down vote
accepted
From man page:
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.
add a comment |Â
up vote
7
down vote
accepted
up vote
7
down vote
accepted
From man page:
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.
From man page:
-y
--symlinks
For UNIX and VMS (V8.3 and later), store symbolic links as such in the zip archive, instead of compressing and storing the file referred to by the link. This can avoid multiple copies of files being included in the archive as zip recurses the directory trees and accesses files directly and by links.
answered Jun 25 at 20:02
SivaPrasath
3,88611737
3,88611737
add a comment |Â
add a comment |Â
up vote
0
down vote
You will need to include the full path to the directory that you want to exclude. If it is inside of /home/test
:
zip -r myzip.zip /home/test -x /home/test/share/*
If it's elsewhere:
zip -r myzip.zip /home/test -x /home/test/path/to/share/*
add a comment |Â
up vote
0
down vote
You will need to include the full path to the directory that you want to exclude. If it is inside of /home/test
:
zip -r myzip.zip /home/test -x /home/test/share/*
If it's elsewhere:
zip -r myzip.zip /home/test -x /home/test/path/to/share/*
add a comment |Â
up vote
0
down vote
up vote
0
down vote
You will need to include the full path to the directory that you want to exclude. If it is inside of /home/test
:
zip -r myzip.zip /home/test -x /home/test/share/*
If it's elsewhere:
zip -r myzip.zip /home/test -x /home/test/path/to/share/*
You will need to include the full path to the directory that you want to exclude. If it is inside of /home/test
:
zip -r myzip.zip /home/test -x /home/test/share/*
If it's elsewhere:
zip -r myzip.zip /home/test -x /home/test/path/to/share/*
answered Jun 25 at 20:14
Nasir Riley
1,494138
1,494138
add a comment |Â
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f451832%2fzip-but-do-not-scan-excluded-folder%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
The file structure has symbolic links everywhere in that folder. It causes it to loop infinitely when recursively going through that folder. Hence the need to exclude from the scan.
â jimbob
Jun 25 at 19:43
"I am making a zip of a directory." Does it have to be
zip
? Or would you accept "I am making a backup of a directory"? Native tools includetar
orpax
, andgzip
orbzip2
.â roaima
Jun 25 at 21:01