I have one copy cp
command related question:
In my home directory, there is a folder which is known as WebDev
, Inside WebDev
folder, there is a target
folder which contains WebDev.rar
.
Now, I am deploying the new war file after building using maven. My tomcat is in different directory. So basically, when I am inside the tomcat directory, I am typing the following command:
• sudo cp ~/WebDev/target/WebDev.war .
Basically what above command is doing is (since I am already inside the tomcat directory), I am copying the WebDev.rar
inside the tomcat. Is it a correct way to do that? I didn't understand why there is a dot .
with a space after WebDev.rar
.
Or alternatively, if I want to copy the file by navigating to various directory using FileZilla, is that a good option?
.
is the current directory you are in (and..
the parent directory of that).
should always be after one space, right? In my caseWebDev.war
and one space and then.
.cp
requires two arguments, and the space delimits the source and the destination arguments.~/WebDev/target/WebDev.war
is the source and.
is the destination separated by space which makes sense. Thanks