Linux Help
guides forums blogs
Home Desktops Distributions ISO Images Logos Newbies Reviews Software Support & Resources Linuxhelp Wiki

Welcome Guest ( Log In | Register )

Advanced DNS Management
New ZoneEdit. New Managment.


Sign Up Now
> Having trouble copying and moving file ?!?! Help, Command Line / Relative Path & Absolute Path
post Feb 25 2016, 02:52 PM
Post #1

Whats this Lie-nix Thing?

Group: Members
Posts: 3
Joined: 25-February 16
Member No.: 19,051

Been struggling for hours trying to figure this out and I'm getting frustrated. I needa know what i am doing wrong.
This is the tree i am working with. And the exercise goes as follows:

Your current directory is stenton. Make a copy of the file annex(in markham), called annex2, and place it in markham.

`-- 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.doc

Now i have tried everything from cp ../markham/annex annex2

mv /sample_dir1/sample_dir/markham/annex annex2

Now I think what i am missing is the part to move the copied file into the markham directory but I cant seem to figured out what I am missing.

Please help. really trying to figure this out as well as understand it.

Go to the top of the page
+Quote Post
Start new topic
post Feb 25 2016, 04:35 PM
Post #2

Its GNU/

Group: Support Specialist
Posts: 1,806
Joined: 23-January 03
Member No.: 360

I do not see anything in the question about moving files.

I assume this is an exercise on paths. .. is the parent which is one directory up the tree. . is the current working directory. A path starting with / is absolute and relative if it does not.

The syntax for cp is:
cp source destination

cp ../markham/annex annex2

If the destination does not have any path then it will be created in the current working directory. If the destination is supposed to be in the same directory as the source than what do you think the path/file should be?
Go to the top of the page
+Quote Post

Posts in this topic

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:


RSS Lo-Fi Version Time is now: 19th March 2018 - 04:06 AM