Use ls
to view the contents of your Home directory.
My-Computer:~ myusername$ ls
In the terminal, use mkdir
to create a folder on the Desktop called 'my_first_directory'. Look on your Desktop. Do you see it?
My-Computer:Desktop myusername$ mkdir my_first_directory
pwd
to check your location.
My-Computer:my_first_directory myusername$ pwd
Make a copy of your 'my_first_file.txt' from it's current spot to directly on the Desktop with cp my_first_file.txt ../my_first_copy.txt
.
My-Computer:my_first_directory myusername$ cp my_first_file.txt ../my_first_copy.txt
Use ls
in the terminal to verify your 'my_first_copy.txt' on your Desktop. Open it up. Is it the same as your first file?
My-Computer:Desktop myusername$ ls
Use ls
to see that the copied file is no longer on your Desktop.
My-Computer:Desktop myusername$ ls
cd ..
to get back out to your Desktop.
My-Computer:my_first_directory myusername$ cd ..