質問

I am currently working on an exercise in the Command Line Crash Course (http://cli.learncodethehardway.org/book/ex11.html)

So far I learned and understand how to copy (cp) and move (mv) directories and files within the same path.

BUT!

How do I move (mv) or copy (cp) a file or directory into a separate path? Example:

Here is a path

Path 1: ~/temp/i/like/icecream ~/temp

Path 2: ~/desktop/blue/red/yellow ~/desktop

If I wanted to get lets say blue from the desktop, into my temp folder how do I do this?

I always get a bash error or "this file or directory doesn't exist". I understand it is only reading what is in that specific path or what is in the "desktop" but I can't figure out for the life of me how to get two different paths to recognize one another. The only way I can successfully do this is use my GUI and put my temp directory in my desktop directory OR by dragging the files I want from the temp directory to the desktop. If I can do this with my GUI, shouldn't I be able to do this with my CUI? Thanks!

役に立ちましたか?

解決

If I wanted to get the given folder blue into my personal temp directory, I would type:

mv ~/desktop/blue ~/temp

This is what it appears you want to do; comment if it doesn't work.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top