Skip to main content
Logo image

Section 14.8 Move a File

The command mv moves a file (as in take it from one location and relocate the file to another location). It is the command-line analog of drag-and-drop.

Activity 14.9.

In the Practice Linux Window below, verify that there is a file named "myLongAssignment.c" inside the engs20 folder. Then, type:
mv ~/engs20/myLongAssignment.c ~/engs20/workspace/LA1
If you are already in the engs20 folder, you could type:
mv myLongAssignment.c workspace/LA1
Now, check that "myLongAssignment.c" no longer resides in ~/engs20 but has moved to ~/engs20/workspace/LA1.
You can also rename a file using mv. Navigate into the folder ~/engs20/workspace/LA1 and type mv myLongAssignment.c myLA.c. Type ls to verify the name change.

If the server window does not load, please click here.