Linux zip doesn't maintain directory structure [closed] - linux

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 4 years ago.
Improve this question
I have a directory I am trying to zip on Linux before sending it to Windows.
I thought it worked with this command:
zip -r directory.zip directory
However when I looked at the directory it contained only the files, no folders.
It's as if the -j command is the default, which is confusing.
I looked in the manual and I could not see any means of forcing it to maintain the directory structure in the zip.
Any ideas?

It was an unzipping issue, not a zipping issue.
The unzip command required -d to maintain the directory structure.
wzunzip -d directory.zip

Related

cmake gets confused and thinks that build directory is source directory [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 7 months ago.
Improve this question
I am trying to install opencv on my raspberry pi 4 with raspian OS.
I am using this tutorial https://docs.opencv.org/3.4/d7/d9f/tutorial_linux_install.html and I have navigated to a build directory in my source directory /home/icetea/Desktop/working_dir/opencv/build
Then I execute this command:
cmake -D CMAKE_BUILD_TYPE=Release -D CMAKE_INSTALL_PREFIX=/home/icetea/Desktop/working_dir/opencv
I get this error:
CMake Error: The source directory "/home/icetea/Desktop/working_dir/opencv/build" does not appear to contain CMakeLists.txt
It thinks the build dir is the source dir. My source dir does 100% contain that .txt file, but my build dir is empty. I have tried executing this command while in the source dir and I get this error:
FATAL: In-source builds are not allowed. You should create a separate directory for build files
Anybody have any insight?
Thank you very much
Smitty

Terraform not reading Symlink file [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 1 year ago.
Improve this question
I have a global variables file that i want to use in different subfolders. For that i put it in a folder called shared then i did a symlink in the other subfolders.
shared
.global_variables.tf
s3
.gloabl_variables -> shared/global_variables.tf
.main.tf
.output.tf
.variables.tf
I created the symlink using this command : ln -s shared/global_variables.tf s3/global_variables.tf
Now in the S3 folder if i run terraform init i'm getting this error :
Error: Failed to read file
The file "global_variables.tf" could not be read
It seems like terraform is not recognizing the symlink of the file.
How to solve that ?
Thanks

Not able to use dos2unix on UNIX machine [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about a specific programming problem, a software algorithm, or software tools primarily used by programmers. If you believe the question would be on-topic on another Stack Exchange site, you can leave a comment to explain where the question may be able to be answered.
Closed 7 years ago.
Improve this question
I try to use dos2unix command on unix machine but it gives me error like --
data_load]$ dos2unix a.csv a.csv
-bash: dos2unix: command not found
Then i use ---
data_load]$ yum search dos2unix
Loaded plugins: fastestmirror, refresh-packagekit, security
Loading mirror speeds from cached hostfile
=================================================== N/S Matched: dos2unix ===================================================
dos2unix.x86_64 : Text file format converter
Is there any way that i can use it and i can not log in as ROOT
You could ask your sysadmin to install dos2unix. Apparently he didn't install it yet.
You might compile it from its source code. If it has a configure script (from autoconf) you might pass a --prefix=$HOME/soft argument to that script and later add $HOME/soft/bin/ to your $PATH.
Perhaps using tr(1) might be enough...

how to solve "unzip: cannot find or open" error in linux OS [closed]

Closed. This question is not reproducible or was caused by typos. It is not currently accepting answers.
This question was caused by a typo or a problem that can no longer be reproduced. While similar questions may be on-topic here, this one was resolved in a way less likely to help future readers.
Closed 2 years ago.
Improve this question
I tried to extract my file on the linux command line:
unzip myfile.zip
But this error occurred:
unzip: cannot find or open myfile.zip, myfile.zip.zip or myfile.zip.ZIP
unzip cannot find the file myfile.zip. Make sure the file exists in your current working directory. You can also try to provide an absolute path.
unzip -d /zip osTicket-v1.10.zip
/zip is a directory
osTicket-v1.10.zip = zip file
Make sure the folder was not partially transferred. I got this error due to an incomplete folder sftp. When I re-transferred it unzipped fine.
If your zip file contain space like "my file.zip" try to remove/replace space in my case i renamed "my_file.zip" and then the command (unzip my_file.zip) worked fine.

cd.. command does not work [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 10 years ago.
The community reviewed whether to reopen this question 11 months ago and left it closed:
Original close reason(s) were not resolved
Improve this question
I made a directory in my ubunto desktop and copied some file inside it.
I tried to go inside the directory by using the terminal.
the issue I have is when I want to back to the parent directory which is "Desktop" by using "cd.." command I got an error says cd..: command not found
I'm a newbie and want to know the reason.
would you explain it for me.
thank you
You need space, after command cd
cd ..
You missed the space in between cd and ..:
cd ..
You are missing a space, should be cd ..

Resources