From the course: Unix Essential Training

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Deleting files and directories

Deleting files and directories - Unix Tutorial

From the course: Unix Essential Training

Start my 1-month free trial

Deleting files and directories

- Now that we know how to create, move and copy files and directories, let's learn how to delete them in Unix. The first and most important thing you need to know is that deleting in Unix is not the same as putting items in the trash or the recycling bin on your operating system. The trash can was a later user-friendly invention. On Unix, when you delete a file or folder, it is gone immediately and forever. You can't move it back out of the trash, it's gone permanently. Let's go to the command line and try deleting some files and directories. Notice that I'm inside the my project directory, which is inside my user home directory. Let's start by doing ls-l so we can see what files and directories are there. Let's create a duplicate, a file second dot txt, and then we'll delete it. We learned how to use copy in the last movie. So we'll do file underscore second dot txt. And the new file is called delete me dot txt.…

Contents