From the course: Linux: Files and Permissions
Unlock the full course today
Join today to access over 24,800 courses taught by industry experts.
Deleting files and dirs - Linux Tutorial
From the course: Linux: Files and Permissions
Deleting files and dirs
- 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 does not 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. Type in "mkdir ~/rmexercise" and hit enter. Now let's change into it by typing 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. Now, type in "touch dir1/file1.txt" and hit enter. And lastly, type in "touch file { a, b, c, d} .txt and hit enter. Here, I'm using brace expansion to create dir1 and dir2, as well as file a, file B, file C, and file D .txt. We can verify the directory structure by…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Understanding filesystem paths4m 18s
-
(Locked)
Creating files and dirs4m 38s
-
(Locked)
Copying files and dirs4m 39s
-
(Locked)
Moving and renaming files and dirs4m 11s
-
(Locked)
Deleting files and dirs3m 44s
-
(Locked)
Creating links to files and dirs6m 24s
-
(Locked)
Making file manipulation safe2m 12s
-
(Locked)
Challenge: Linux files3m 21s
-
(Locked)
Solution: Linux files3m 45s
-
-
-
-