From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep
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 dirs - Linux Tutorial
From the course: LPIC-1 Exam 101 (Version 5.0) Cert Prep
Remove files and dirs
- [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…
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
-
-
-
-
-
-
-
-
-
-
-
-
(Locked)
File globbing and parameter expansion4m 51s
-
(Locked)
Understand filesystem paths4m 28s
-
(Locked)
Create files and dirs5m 18s
-
(Locked)
Copy files and dirs5m 48s
-
(Locked)
Move and rename files and dirs4m 59s
-
(Locked)
Remove files and dirs6m 2s
-
(Locked)
Create links to files and dirs4m 55s
-
(Locked)
-
-
-