How to Copy File in Linux With Terminal




Maybe you've been there and understand how to copy or move files. But for those who are amateur or just learning the computer certainly still do not know. If in windows, how to copy or move files is easy i.e. we just right click on the file or folder that you want to copy and click copy (if you want to copy a file or folder) and click or cut (bia wants to move or cut a file or folder) then sign in to the destination folder and right click and then paste, then it's over. Or can also use the keyboard that is press Ctrl + C (copy file) and Ctrl + V (Paste the file).

For ubuntu desktop itself is actually not much different. But when passing the terminal so the injunction is definitely different. In linux, the most frequently used commands to copy, move and rename files or folders is "cp" and "mv".

Here are some how to use cp and mv

1. Copy the File
type the following commands on your terminal
cp source_file destination_file

2. Copy the Folder
type the following commands on your terminal
cp -R source_folder destination_folder

3. Move the File or Folder
type the following commands on your terminal
mv source_folder/file destination_folder/file

4. Rename using mv
type the following commands on your terminal
mv Old_File New_File




Next
Previous
Click here for Comments

0 comments: