Upload File to Hidden Directory Raspberry Pi
8 Answers 8
Help u.s.a. meliorate our answers.
Are the answers beneath sorted in a way that puts the best answer at or near the top?
EDIT: The correct mode is zip -r 1.zip .
The commands shown in my previous answer below are incorrect because they likewise include the parent directory.
Have you tried this:
zip yourfile.nothing sourcedir/* .* or you in your case
zip i.zip * .[^.]*' It should include all subconscious files also.
liamvictor
3,161 1 gold badge 21 silverish badges 25 bronze badges
answered Sep 19, 2012 at 10:50
GunnarGunnar
2,425 four gold badges 19 silver badges 22 bronze badges
5
Or y'all can add more unproblematic
zilch i.zip ./ answered Mar 24, 2016 at 6:56
pictorupictoru
692 half dozen silver badges 16 statuary badges
Just to exist sure information technology is not forgotten since this is a forum for developers and a good number of us use git.
An like shooting fish in a barrel fashion to become only what you want in the cipher is to utilise git archive -o filename.zip branch
answered Aug v, 2015 at seven:03
codecode
3,873 2 golden badges 23 silver badges 44 statuary badges
4
-
Thanks! That was exactly what I needed: a lot less troubles than manually calling
nada.Apr 4, 2016 at twenty:33
-
This approach doesn't include the
.git/directory thoughFeb 13, 2020 at 3:49
-
@ScottMcC If you needed something that was already git related, wouldn't you just clone it?
Feb 13, 2020 at vii:05
-
It would exist nice for transferring with scp
Mar 12, 2020 at 21:12
If y'all want to zip all files (+subconscious files) Kindly using: zip -r namefiles.zippo . The "." is all files in folder.
zip -r namefiles.zip "folder will goose egg" answered Jan fourteen, 2016 at 2:24
D zD z
95 1 silver badge 3 bronze badges
three
-
How is your answer different to the accepted answer, which states "The correct way is
zip -r i.zilch ."?January 14, 2016 at two:34
-
@SimonMᶜKenzie He as well explained what "." means. That made the difference I suppose.
October 15, 2016 at 7:eighteen
-
The "." is Non all files in folder. Information technology ways the "electric current folder" itself, which would ultimately include all its contents.
Aug xi, 2017 at 7:33
On macOS 10.15.7 I had to separatelly add all dot leading files (\.*) and rest of the files (*):
zip -r file.null \.* * answered Apr 5, 2021 at 10:43
if you don't take rights to save zip file in current dir y'all can go to dir where you take rights and type
zip -r ane.zip /path/to/source/dir/. However when if in .../some_dir you type
unzip i.zero then your files will be decompress into .../some_dir/path/to/source/dir/
answered Mar 3, 2019 at 19:13
Kamil KiełczewskiKamil Kiełczewski
69.2k 26 golden badges 317 silver badges 287 statuary badges
If you'd like to save some subdirectory of the current directory recursively with hidden and regular files simply type
zip -r backup-subdirectory.naught backup-subdirectory/. backup-subdirectory/* answered Feb 3 at 20:32
zip -r 1.zero .* -ten "../*" Only doing naught -r i.zip .* will include the parent folder also so the play a joke on is to exclude the parent folder using -x "../*"
answered Mar 4 at 18:38
Arpan SarkarArpan Sarkar
two,066 2 gilded badges 12 silver badges 22 bronze badges
Non the answer you're looking for? Browse other questions tagged zero hidden-files or ask your own question.
Source: https://stackoverflow.com/questions/12493206/zip-including-hidden-files
that pretty much works only now im besides getting ../ which i dont recollect i want.
Sep nineteen, 2012 at x:54
by ../ you mean, yous are as well compressing files from the directory above?
Sep xix, 2012 at 11:00
apparently. When i do nil 1.zip * .* (in a folder with subfolder a and a hidden file chosen '.hidden_file') i get:
Sep nineteen, 2012 at 11:03
adding: a/ (stored 0%) calculation: ../ (stored 0%) adding: .hidden_file (stored 0%)
Sep 19, 2012 at xi:04
or as you said, 'zip -r i.nothing .', which besides works and is simpler.
Sep 19, 2012 at xi:12