termux directory commands

There are several commands you can use to navigate and manage directories in Termux:

  1. ls” – Lists the files and directories in the current directory
  2. pwd” – Prints the current working directory
  3. cd” – Changes the current working directory. For example, “cd Documents” changes to the Documents directory.
  4. mkdir” – Creates a new directory. For example, “mkdir newfolder” creates a new directory called “newfolder”.
  5. rmdir” – Removes an empty directory. For example, “rmdir oldfolder” removes the directory “oldfolder” if it is empty.
  6. rm -r” – Removes a directory and its contents. For example, “rm -r oldfolder” removes the directory “oldfolder” and all of its contents.
  7. touch” – Creates a new file. For example, “touch newfile.txt” creates a new text file called “newfile.txt”.
  8. mv” – Renames or moves a file or directory. For example, “mv oldfile.txt newfile.txt” renames the file “oldfile.txt” to “newfile.txt”.
  9. cp” – Copies a file or directory. For example, “cp file1.txt file2.txt” copies the file “file1.txt” to a new file called “file2.txt”.

It’s important to note that these commands should be used with care, as some of them can delete or overwrite files and directories.

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top