Linux where does zip place the newly created zip file? [closed] - linux

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 5 years ago.
Improve this question
Looking to zip up a folder on my linux box ie zip -r9 test /var/www/html/ where does that resulting test.zip file end up? in my pwd? I still want to leave the contents of /var/www/html intact.

Yes, it creates zip in your current working directory.

True is that you are free to specify relative or absolute paths like you wish.
zip test.zip path/to/files
will place test.zip in the current working directory.
zip /foo/bar/test.zip path/to/files
will place test.zip in /foo/bar

Related

How to change directory of a file in ubuntu [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 2 years ago.
Improve this question
I have python file in by ubuntu virtual machine's home directory. Is there any way I can move it to another directory instead of copying the entire code and then making a file in the directory and then pasting and saving it as a new file.
Can you use the copy (cp) command?
cp <file_to_copy> <location_to_copy_to>
That's a very silly question.
Just copy/cut the file and move it to the required directory. No need to copy the code and the creating a new file in another directory you can do this manually ( by right clicking, cut ,paste) or via terminal by just typing mv [Path of file] [The destination or cp [Path of file] [Destination]

Linux command Cat dont file archive but archive in folder [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 4 years ago.
Improve this question
When I try to cat in one file, for exemple cert.pem I receive ab error: No such file or directory
These are symbolic links - special files that just contain the path to another file. When you cat them, they essentially redirect to the file they link to. However, as evident by the red color in the ls output, these links are broken - they point to files that do not exist, and thus you get that error when you try to cat them.

Linux linking folders [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 have two folders /tmp/logs and /home/tmp/
/tmp/logs has 50 files already in it.
I want to move all the files to /home/tmp and also when a new file is created in /tmp/logs it gets created to /home/tmp instead.
So /tmp/logs just exist as a folder but nothing gets created inside it.
#move /tmp/logs to their new location
mv /tmp/logs /home/tmp
#replace the original /tmp/logs with a link to /home/tmp
ln -s /home/tmp /tmp/logs
Now whenever a program requests the kernel that anything be done in /tmp/logs, the kernel will see it's a symbolic link and will instead act on the corresponding file in /home/tmp (what the link points to).

In Linux, zip multiple directories in one named zip file [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 6 years ago.
Improve this question
I have the following directories, I want to zip up into the same zip file. Can someone provide the correct syntax?
ie. zipping the following directories:
/home/users/jlefler/files
/opt/software/reports/files
into a zip file called backup.zip.
try
zip -r backup.zip /home/users/jlefler/files /opt/software/reports/files
you can add more directories at the end of the command

Replace all files except one with rsync [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 9 years ago.
Improve this question
I'm currently using rsync as follows
rsync -az --delete ...
What option can I use with rsync to replace all destination files that already exist except for one specific file that should not be replaced if already exists? Sure, if the file doesn't exist at the destination, it should be put there.
I don't know whether it is possible in one invocation, but you could call rsync twice:
rsync ... --ignore-existing file dest
Now the file is put there if it didn't exist before.
rsync ... --exclude file src dest
Now all the other files are handled as usual, except for the one excluded file.

Resources