How to Move, Copy & Delete files in Termux

How to Move, Copy & Delete files in Termux.






        Hello friends, in this post I am going to tell you how you can move and copy and delete any file and folder in termux. We saw the basic commands of termux in the previous post. Now we will see the commands that copy, move and delete files.



Important things for this

1.  Termux Apk: -  Download



How to move files and folders in Termux?

          So let us first see how to move files and folders. we use the move and cut option to move a file to another folder in the file manager. So in that way we use 'mv' command to move a file in termux. With this command, you can move any files, apk, song, movie, folder.
         So how to use this command. For this, you have to see the steps given below.

1 . First open the termux apk
2. After that you have to go to the folder or files you want to move.
3 . Now you have to enter 'mv' command and after that you have to enter the name of the file you want to move by giving space. Then you have to give space


$ mv Android


4. Now we have to enter the location of the file where we want to move it.

5. Now you have to open the new session.

5. After that you have to open the folder in which the file will to be moved.

6 . After that you have to type 'pwd' command ,so that we will get the location of that folder.


$ pwd


7. Now you have to copy that location and open the first session and paste it there.


$ mv Android /sdcard/Blogger


8 . Now you have to press enter button. After that your file will be moved. So in this way you can move any file or folder with 'mv' command.




How to copy files and folders in Termux?

        Now we see how to copy and paste any file and folder in termux. The way we copy and paste files in the file manager with the direct 'Copy' option, in that way some commands are used in termux
         but friends there are 2 commands for this, from the first command we just copy files like apk, song, doc, pdf  files but we cannot copy the folders. And with another command, we can copy both files and folders, so now let us see those commands.


1. cp

        Using this command, we can copy any file except the folders. To use this command, follow the steps below.

1 . First open the termux apk.

2. Open the folder in which you want to copy the file.
3 . Now you have to enter 'cp' command and after that give space, and type the name of file , which you want to copy and give space.


$ cp Blogger.apk


4. After that, you will have to type the loaction of folder where you want to paste this file . Then for this
5 . you have to open a new session. And you have to open the folder in which you want to paste the file.
6 . Now you have to enter 'pwd' command and press enter button. After that you will get the location of this file, then you have to copy that location.


$ pwd


7. Now you have to open the first session again and paste this location there.


$ cp Blogger.apk /sdcard/Android


8. Now you have to press the enter button. After that this file will be copied and pasted in your given folder, you can check.


2. cp -r

        Now 'cp -r' command, with this command you can copy everything, means files, folders everything. So the use of this command is the same as the command given above. All you have to do is type 'cp -r' command, after that you have to enter the name of the folder or file you want to copy and you have to enter the location by giving space, wherever you want to paste it.


$ cp -r Android /sdcard/Images


      So in this way you can copy and paste any file or folder in termux.





How to delete files and folders in Termux?

        Now we see how we can delete or remove files in termux. we can delete files and folders using the delete button in the file manager. So similarly we do some commands in termux. But it is very easy to use these commands. Then you will find all the commands below which are used to remove files.


1. rm

      So now command is 'rm'. With this command, we can only delete files, not folders. So this is very easy to use. Then follow the steps given below to use this command.

1. Open Termux apk.
2. Go to the file you want to delete.
3. Now you have to enter 'rm' command and enter the name of the file you want to delete and enter.


$ rm Tajmahal. Png


4. After that the file will be deleted


2. rmdir

       So now is 'rmdir' command. The use of this command is similar to the command given above. And it is also used only to delete files, and this command does not delete the folders. So you have to give 'rmdir' command and after that by giving space, you have to enter the name of the files you want to delete and enter and that file will be deleted.


$ rmdir installation.pdf



3. rm -rf

       So now is 'rm -rf' command. So use of this command all in one, because with this command we can directly delete files and folders. So this is very easy. To do this, you also have to do the above command. First type the command 'rm -rf' then enter the name of the file or folder you want to delete and then enter. The folder and file you entered will be deleted.


$ rm -rf Android



      So friends, you can copy, move and delete files or folders by using these commands in termux in this way. So comment if you have any questions.

        If you want to see the practical use of these commands, then watch the YouTube video above.



Follow us


YouTube channel: -  follow
Facebook group: -  follow
Instagram account: -   follow
Hindi blog: -. follow
English blog: -. follow

Post a Comment

0 Comments