How to delete a file with the editor (nano)?


#1

hello !! please how to delete a file with the editor (nano) ?


#2

From the console, assuming the file is in the same directory you’re in, run rm nameOfFile.extension e.g. rm server.js (if you need to change directories do cd directoryName first)


#3

You also need to run the refresh command if you want the file to disappear from the editor.