I have this problem as part of a school assignment:NOTE: In case it's hard to read in the image above, here's the directory tree:$ tree.`-- sample_dir1    `-- sample_dir        |-- admin        |-- cambridge        |   |-- cafeteria        |   |-- library        |   `-- security        |       |-- annex        |       |-- building        |       `-- parking        |-- faculty        |-- history.exe        |-- markham        |   |-- annex        |   |-- building1        |   `-- parking        |-- oxford        |   |-- outline.doc        |   |-- programming        |   |   `-- report.pdf        |   `-- security        `-- stenton            |-- gen_ed            `-- lib_arts                |-- english.txt                `-- match.doc15 directories, 11 filesI tried doing the command:$ cp ../cambridge/security/parking ./parking2...but it isn't working. The question in the image above states that the current directory is stenton, and that we need to make a copy of the file named parking (from the security directory), and to name the new file parking2, and place it in the current directory,stenton`, using relative pathnames.What am I doing wrong? My cp command seems to be correct.
How can I copy a file from another directory to the current one?
cp
This is a very elementary question. I would read up on the man pages for this one. But nonetheless, here is your answer:cp <SOURCE> .For example:I have a file in this directory: /home/rkah/sample1The file is called: sampleSay if I wanted to go to my home directory which is: /home/rkah/ and copy sample to /home/rkah/, I would run this command:cp ~/sample/sample . The . symbol stands for present working directory or the directory im currently in.