Opening a file location in termux | Sololearn: Learn to code for FREE!

0

Opening a file location in termux

I want to open a file named learning log But termux takes the space in between learning and log as something else. So how do I open this file without changing the name ?

10/19/2021 4:35:44 PM

Richard

14 Answers

New Answer

+3

Plus, what do you mean by 'open'? Do you mean print to standard output so you can view the text? Cause you can use cat. Go to the directory where the file is located and enter: cat <filename> come on Coding Cat get on vim! Its not bad after a while. Nano is pretty cool though

+2

I'm sure it must, I usually just go for vim. Its the same across platforms, but dang it's usually preinstalled on most distros. You also might want to look into making a ".vimrc" file if you like customization. Line numbers, color, indent lengths, etc.

+1

[ESCAPE] [ESCAPE] [ESCAPE] (just to be sure) *close options :q! "close now! don't save" :x "save & close" only two i really ever use

+1

Right, because you are trying to run a python file Im guessing? If so, the syntax is: python <filename> [options, ...] Plus you can't change directory INTO a file. It doesn't contain any other files

+1

Then type the first few letters of the file and press TAB. It'll autocomplete the filename so you know how to enter it

+1

You can open files name containing spaces, by adding backslash. cat <filename> For your case: cat learning\ log

+1

Slick I figured it out internal storage on Android is this location: /storage/emulated/0 So I changed the filename to learning_log and then did this cd /storage/emulated/0 cd learning_log And it worked

+1

touch filename :- to create an empty file cat filename:- accessing or reading that file

0

Slick open with command(cd)

0

cd or "change directory" just moves you to another location in the filesysystem. when you are in the directory the file you want to read is located, use cat

0

Slick ya I am working on Django project. I want to do this : cd learning log manage.py runserver But It is not working

0

if you didn't write manage.py yourself, i'd try: python manage.py runserver and try not to put spaces in your filenames

0

Slick the cd part says no such file directory. Yet on pydroid it is working

0

Django project is not python file it's a folder Slick