Skip to main content

How to Move, Copy & Delete files in Termux



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

2. 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

 

rm dir


       So now is 'rm dir' 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.


$ rm dir installation.pdf



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
Telegram group: -  follow
WhatsApp me: -   follow

WhatsApp group: - follow

English blog: -. follow

POST A COMMENT

0 Comments

Comments

Popular posts from this blog

Setting up a free SMTP server for sending emails

Setting up a free SMTP server for sending emails typically involves using an email service that offers free SMTP access. Here's a general guide on how to set up SMTP for free: 1. **Choose a Free Email Service**: There are several email providers that offer free SMTP servers, including Gmail, Yahoo Mail, and Outlook.com. Choose the one that suits your needs. 2. **Create an Email Account**: If you don't already have an email account with the chosen provider, sign up and create one. Make sure to remember your email address and password. 3. **Enable SMTP Access**: Some email providers may require you to enable SMTP access for your account. This is often found in your account settings or security settings. Enable SMTP access if required. 4. **Obtain SMTP Server Details**: Your email provider will have specific SMTP server details you need to use. These typically include:  - SMTP Server Address (e.g., smtp.gmail.com for Gmail)    - SMTP Port (e.g., 587 for STARTTLS or 465 for SSL/T...

Bash Cheetsheet

Top 25 created and custom command 4th, February, 2023  The command line is something every developer should learn and implement into their daily routine. It has become a Swiss Army knife of features behind deceptively simple commands, which allow you to gain greater control of your system, become more productive, and much more. For example, you can write scripts to automate daily, time-consuming tasks, and even quickly commit and push code to a Git repository with just a few simple commands. In this post, we’ll look at the Bash Shell (Bourne Again SHell), which is a command-line interface (CLI) and is currently the most widely used shell. This is a light introduction to the most popular commands, when you’re most likely to use them, and how to extend them with options. Later on in this article, you’ll learn how to create your own custom commands (aliases), allowing you to create shortcuts for a single command or a group of commands. When it comes down to it, if you don’t know the comma...