From the course: Red Hat Certified System Administrator (EX200) Cert Prep: 1 Deploy, Configure, and Manage (2021)

Unlock the full course today

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

Remove files and directories

Remove files and directories

- [Instructor] We have a couple of commands dedicated to removing files and directories namely rm and rmdir. You may want to note that on the command line Linux doesn't have a recycle bin. If you delete a file it is for all practical purposes deleted be careful recovering files requires extra work. Let's create a directory for this exercise and CD into it in a terminal type in mkdir rmexercise and hit Enter then type in cd rmexercise and hit Enter again. You can verify your path by typing in PWD. Now that we have a directory and we've changed into it let's create some files, type in mkdir dir{1,2} and hit enter. I've used brace expansion to create two directories called dir1 and dir2 you can verify this by typing in LS. Now let's type in touch dir1/file1.txt this will create a file inside the directory named dir1. Let's create a couple more files by typing in touch file{a,b,c,d}.txt and hit enter. We can verify our…

Contents