Please help!! I am not able to use atom editor to create file into a directory in the terminal. This is from the first exercise on python.
I’m not sure what you mean, but I always “save as” just like any document, and find the directory I want it in before I push that (save) button. If I want my file in the desktop, when I’d click that “save” from the drop down menu in atom, my system will ask where I want to save it. People here are happy to help. Can you explain “put the file into a directory” a bit more?
Is it a specific directory that you made?
Hi @v.s01 welcome aboard. Are you using a Mac, given you mention Terminal?
It’s worth mentioning that Terminal and Atom are very different things. Terminal is a command line interface that lets you interact with your computer without a user interface.
Atom is an editor, a bit like Textedit but much prettier and with some development features. It’s worth spending time using Terminal only to get comfortable with it (as you will need to use it lots as you gets more familiar). (Checkout the command line appendix if you haven’t already).
I know VS Code has an embedded Terminal too.
If you are in the terminal you type
touch my_new_file.py to create a new file in the actual directory (folder).
If you are in Atom you do File >> Save as >> my_new_file.py to a directory you choose. If you choose the same as you are in with your terminal, say,
exercise_01 type the following command in your terminal:
ls and you will see your new file.
The answers given so far are correct, but I suspect you are having a different problem. Can you elaborate:
- You mean, you don’t know how to Save a file to a different place than the default?
- You mean, you don’t know how to find a file in your Terminal after you save it?
I suspect you mean #2 not really #1.