Now let us copy a file into the new directory called research. We will make a copy of and put it into the ‘data1backup’ research directory. You can do this by using the command ‘cp’ as: cp data1backup research We used this command to create a new copy of a file. In the above command, the last name is a directory so this command will make a copy of and put it into the ‘data1backup’ ‘research’ directory. The name of the file in the research directory will also be called and will have the same content. ‘data1backup’ mv to move files around directories If you want to now move a file into the directory then ‘research’ you can do this by using the mv command. Type: mv data1 research This will move from the current home directory and put it ‘data1’ into the directory called research. No copy of remains ‘data1’ in the current directory for the mv command. [Info: When using the or commands, if the last word names ‘cp’ ‘mv’ a directory then the command will place the file in that directory. leaves a copy in the original directory whereas does ‘cp’ ‘mv’ not.
Now let us copy a file into the new directory called research. We will make a copy of ‘data1backup’ and put it into the research directory. You can do this by using the ‘cp’ command as: cp data1backup research We used this command to create a new copy of a file. In the above command, the last name is a directory so this command will make a copy of ‘data1backup’ and put it into the ‘research’ directory. The name of the file in the research directory will also be called ‘data1backup’ and will have the same content. mv to move files around directories If you want to now move a file into the ‘research’ directory then you can do this by using the mv command. Type: mv data1 research This will move ‘data1’ from the current home directory and put it into the directory called research. No copy of ‘data1’ remains in the current directory for the mv command. [Info: When using the ‘cp’ or ‘mv’ commands, if the last word names a directory then the command will place the file in that directory. ‘cp’ leaves a copy in the original directory whereas ‘mv’ does not.
e-learning%20unix%20final.docx