Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated:
1
00:00:01,290 --> 00:00:06,120
So far we've seen how to create for us to create directories to list the content of directories and
2
00:00:06,120 --> 00:00:08,250
to list the contents of files.
3
00:00:08,250 --> 00:00:11,180
Now what if you want to delete these files or directories.
4
00:00:11,430 --> 00:00:17,780
The way to do that is using the odd command to remove files or they are empty or to remove directories.
5
00:00:17,850 --> 00:00:19,680
Now note that they are MDI.
6
00:00:19,760 --> 00:00:22,690
It works for empty directories.
7
00:00:23,100 --> 00:00:27,300
Here's a few examples that we're going to be using practically and a second item.
8
00:00:27,300 --> 00:00:35,490
Slash them slash this file would remove the test file under the directory temp item dir slash slash
9
00:00:35,490 --> 00:00:43,170
test dir will remove the empty test did so if the directory is not empty we won't be able to remove
10
00:00:43,170 --> 00:00:43,280
it.
11
00:00:43,280 --> 00:00:49,590
Using this commands to remove a directory that is not empty we need to use the minus option which stands
12
00:00:49,590 --> 00:00:54,650
for recursive and we use that with the R and command and it would look as such.
13
00:00:54,680 --> 00:00:59,750
Or minus or slash slash dir to remove the tested.
14
00:00:59,760 --> 00:01:01,550
If it's not empty.
15
00:01:01,560 --> 00:01:04,780
We also saw the minus option with the copy command.
16
00:01:04,800 --> 00:01:06,710
Do you remember what it was.
17
00:01:06,930 --> 00:01:13,290
It stood for active and we use that so we don't accidentally overwrite far as one we're copying.
18
00:01:13,320 --> 00:01:18,810
The same goes for removing as if we don't want to accidentally remove a file before the next prompt
19
00:01:18,810 --> 00:01:28,230
us and ask us to verify we can use the minus ice which for example minus 40 cursive minus for interactive
20
00:01:28,480 --> 00:01:30,070
slushed them slash desde.
21
00:01:30,160 --> 00:01:36,770
It would remove the test directory and everything inside the test directory but only after Linux asked
22
00:01:36,770 --> 00:01:38,330
us to verify.
23
00:01:38,610 --> 00:01:45,090
And last but not least they are minus or F minus or against us for the cursive and the F and this instance
24
00:01:45,090 --> 00:01:51,780
stands for force and we use that in case of directed for example is being used by a program and we cannot
25
00:01:51,780 --> 00:01:58,110
normally access it or delete it if we want to force the delete regardless of what program is using it
26
00:01:58,110 --> 00:02:00,150
or what other users using it.
27
00:02:00,150 --> 00:02:02,230
We can use the commands.
28
00:02:02,340 --> 00:02:04,200
Let's see how that looks like.
29
00:02:04,410 --> 00:02:09,360
I'm going to open the graphical interface so we can also visualize what's happening on the command prompt
30
00:02:11,050 --> 00:02:18,150
and I'm going to go to the temp directory and say the temp directory as you can see there is a direct
31
00:02:18,150 --> 00:02:20,880
test on a bunch of other files on the command line.
32
00:02:20,880 --> 00:02:27,390
I'm going to CD into the temp directory and I'm going to start with the easiest option by removing one
33
00:02:27,390 --> 00:02:28,520
of the files.
34
00:02:28,770 --> 00:02:33,090
I'm going to type M and the filename.
35
00:02:33,120 --> 00:02:36,570
In this case it's a test file and hit enter.
36
00:02:36,700 --> 00:02:40,180
And as you can see on the right hand side this file is now gone.
37
00:02:43,500 --> 00:02:46,470
Now I want to remove a directory in this instance.
38
00:02:46,470 --> 00:02:52,980
It's an empty directory which is the test dir to do that I can use the odd dir space.
39
00:02:53,110 --> 00:02:55,650
Dear Let's try that with a good one.
40
00:02:55,680 --> 00:02:59,510
If you remember D-1 had another directory inside it.
41
00:02:59,700 --> 00:03:02,880
And now Linux is complaining it's telling me that it is not empty.
42
00:03:02,880 --> 00:03:05,760
I cannot remove it.
43
00:03:05,760 --> 00:03:07,230
What do we do in this instance.
44
00:03:07,260 --> 00:03:10,170
We use the M command with the minus option
45
00:03:14,020 --> 00:03:15,540
and there we go it's gone.
46
00:03:15,910 --> 00:03:21,570
So in this instance we remove the old one and whatever was inside did one.
47
00:03:21,580 --> 00:03:29,230
Now let me try the interactive option with test file to get back a prompt asking us do you want to remove
48
00:03:29,230 --> 00:03:29,990
the file.
49
00:03:30,220 --> 00:03:33,020
I'm going to answer yes and the file is gone.
50
00:03:33,490 --> 00:03:36,480
And last but not least we saw the force option.
51
00:03:36,730 --> 00:03:41,440
Let me go into the documents directory on the right hand side and the graphical interface
52
00:03:51,330 --> 00:03:53,370
and to do that on the command prompt.
53
00:03:53,490 --> 00:03:55,440
And this is where the tool is useful.
54
00:03:55,430 --> 00:03:58,640
Remember when we do this and the earlier sections.
55
00:03:58,920 --> 00:04:06,900
I'm going to try r.m minus RF Tilda which stands for my home directory and documents slash the directory
56
00:04:06,900 --> 00:04:09,900
name using the minus f option.
57
00:04:09,900 --> 00:04:14,970
I'm forcing the removal of this directory in case it's being used by another to use it for example.
58
00:04:15,090 --> 00:04:16,620
And now it's gone.
59
00:04:16,680 --> 00:04:18,590
Pretty easy stuff straightforward.
60
00:04:18,630 --> 00:04:20,680
Let's move on to the next section.
6101
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.