0

I'm using Ubuntu and would like to know if there is an easy way to delete a single file through the command line. In the same way you might use 'rmdir -r' to delete a whole file.

  • * correction, "in the same way you might use 'rmdir -r' to delete a whole folder". – Craig Feb 26 '19 at 22:15
  • Never mind I foud out... Feel really stupid for posting now... jusr 'rm "file name"'. – Craig Feb 26 '19 at 22:25
1

Simply use the rm command and pass the relative or absolute path as parameter, e.g.

$ rm your_file_name.txt

or

$ rm /home/craig/your_file_name.txt
| improve this answer | |
1

Please use the command rm.

More information can be found in the man-pages with man rm.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.