Hi everyone,
I’ve finished these two projects and I was wondering how I can delete a file or directory. Eg. I created a directory at a wrong place, also I made a typo in the file name.
What is the shell command for that?
Thanks
Hi everyone,
I’ve finished these two projects and I was wondering how I can delete a file or directory. Eg. I created a directory at a wrong place, also I made a typo in the file name.
What is the shell command for that?
Thanks
Hi,
To delete a directory the command is rm -r <directoryName>
.
Be careful with this command as the -r
stands for recursive and will delete everything in that directory (often with no confirmation message).
To delete a file the command is rm <fileName>
.
For more info read man rm
manual pages for rm
.