Use rm
to remove files in Unix. e.g.,
rm file_to_delete
or better yet if you are uncertain about working in Unix
rm -i file_to_delete
which will prompt with the name of the file to be deleted to confirm the operation.
The file_to_delete
can be in the current directory, or in some other directory as long as the path is properly specified.
See rm man page for more information.
As for creating a file, you can create an empty file with the touch
command. I.e.,
touch some_file
will create an empty file named some_file
. Again, this can be in the current directory, or any directory with the path specified.
For more information see the touch man page.
Your questions wasn't quite clear to me, so if this doesn't answer it please add a comment or (better yet) consider possibly rephrasing your original question or at least the title of your question (removing a file in unix)