Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranรฎ)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Persian
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
1
So far we've seen how to create for us to create directories to list the content of directories and
2
to list the contents of files.
3
Now what if you want to delete these files or directories.
4
The way to do that is using the odd command to remove files or they are empty or to remove directories.
5
Now note that they are MDI.
6
It works for empty directories.
7
Here's a few examples that we're going to be using practically and a second item.
8
Slash them slash this file would remove the test file under the directory temp item dir slash slash
9
test dir will remove the empty test did so if the directory is not empty we won't be able to remove
10
it.
11
Using this commands to remove a directory that is not empty we need to use the minus option which stands
12
for recursive and we use that with the R and command and it would look as such.
13
Or minus or slash slash dir to remove the tested.
14
If it's not empty.
15
We also saw the minus option with the copy command.
16
Do you remember what it was.
17
It stood for active and we use that so we don't accidentally overwrite far as one we're copying.
18
The same goes for removing as if we don't want to accidentally remove a file before the next prompt
19
us and ask us to verify we can use the minus ice which for example minus 40 cursive minus for interactive
20
slushed them slash desde.
21
It would remove the test directory and everything inside the test directory but only after Linux asked
22
us to verify.
23
And last but not least they are minus or F minus or against us for the cursive and the F and this instance
24
stands for force and we use that in case of directed for example is being used by a program and we cannot
25
normally access it or delete it if we want to force the delete regardless of what program is using it
26
or what other users using it.
27
We can use the commands.
28
Let's see how that looks like.
29
I'm going to open the graphical interface so we can also visualize what's happening on the command prompt
30
and I'm going to go to the temp directory and say the temp directory as you can see there is a direct
31
test on a bunch of other files on the command line.
32
I'm going to CD into the temp directory and I'm going to start with the easiest option by removing one
33
of the files.
34
I'm going to type M and the filename.
35
In this case it's a test file and hit enter.
36
And as you can see on the right hand side this file is now gone.
37
Now I want to remove a directory in this instance.
38
It's an empty directory which is the test dir to do that I can use the odd dir space.
39
Dear Let's try that with a good one.
40
If you remember D-1 had another directory inside it.
41
And now Linux is complaining it's telling me that it is not empty.
42
I cannot remove it.
43
What do we do in this instance.
44
We use the M command with the minus option
45
and there we go it's gone.
46
So in this instance we remove the old one and whatever was inside did one.
47
Now let me try the interactive option with test file to get back a prompt asking us do you want to remove
48
the file.
49
I'm going to answer yes and the file is gone.
50
And last but not least we saw the force option.
51
Let me go into the documents directory on the right hand side and the graphical interface
52
and to do that on the command prompt.
53
And this is where the tool is useful.
54
Remember when we do this and the earlier sections.
55
I'm going to try r.m minus RF Tilda which stands for my home directory and documents slash the directory
56
name using the minus f option.
57
I'm forcing the removal of this directory in case it's being used by another to use it for example.
58
And now it's gone.
59
Pretty easy stuff straightforward.
60
Let's move on to the next section.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.