-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathComandos_de_la_terminal%2Frm.mw
152 lines (113 loc) · 5.26 KB
/
Comandos_de_la_terminal%2Frm.mw
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
__NOTOC__
* [[:#rm | rm]]
== rm ==
<syntaxhighlight lang="bash">
[rrc@pridd ComandosDeLaTerminal]$ rm --help
Usage: rm [OPTION]... FILE...
Remove (unlink) the FILE(s).
-f, --force ignore nonexistent files and arguments, never prompt
-i prompt before every removal
-I prompt once before removing more than three files, or
when removing recursively. Less intrusive than -i,
while still giving protection against most mistakes
--interactive[=WHEN] prompt according to WHEN: never, once (-I), or
always (-i). Without WHEN, prompt always
--one-file-system when removing a hierarchy recursively, skip any
directory that is on a file system different from
that of the corresponding command line argument
--no-preserve-root do not treat '/' specially
--preserve-root do not remove '/' (default)
-r, -R, --recursive remove directories and their contents recursively
-d, --dir remove empty directories
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit
By default, rm does not remove directories. Use the --recursive (-r or -R)
option to remove each listed directory, too, along with all of its contents.
To remove a file whose name starts with a '-', for example '-foo',
use one of these commands:
rm -- -foo
rm ./-foo
Note that if you use rm to remove a file, it might be possible to recover
some of its contents, given sufficient expertise and/or time. For greater
assurance that the contents are truly unrecoverable, consider using shred.
Report rm bugs to bug-coreutils@gnu.org
GNU coreutils home page: <http://www.gnu.org/software/coreutils/>
General help using GNU software: <http://www.gnu.org/gethelp/>
For complete documentation, run: info coreutils 'rm invocation'
[rrc@pridd ComandosDeLaTerminal]$ rm --version
rm (GNU coreutils) 8.21
Copyright (C) 2013 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>.
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
Written by Paul Rubin, David MacKenzie, Richard M. Stallman,
and Jim Meyering.
[rrc@pridd ComandosDeLaTerminal]$ alias rm
alias rm='rm -i'
[rrc@pridd ComandosDeLaTerminal]$ rm typescript
rm: remove regular file ‘typescript’? n
[rrc@pridd ComandosDeLaTerminal]$ ls -al typescript
-rwxr-xr-x 1 rrc rrc 1359 Jan 18 15:41 typescript*
[rrc@pridd ComandosDeLaTerminal]$ rm -f typescript
[rrc@pridd ComandosDeLaTerminal]$ ls -al typescript
ls: cannot access typescript: No such file or directory
[rrc@pridd ComandosDeLaTerminal]$ ls -al UniqSortEjemplo
-rw-r--r-- 1 rrc rrc 48 Apr 1 16:56 UniqSortEjemplo
[rrc@pridd ComandosDeLaTerminal]$ unalias rm
[rrc@pridd ComandosDeLaTerminal]$ alias rm
bash: alias: rm: not found
[rrc@pridd ComandosDeLaTerminal]$ rm UniqSortEjemplo
[rrc@pridd ComandosDeLaTerminal]$ ls -al UniqSortEjemplo
ls: cannot access UniqSortEjemplo: No such file or directory
[rrc@pridd ComandosDeLaTerminal]$ rm C1/C2/C3/C4/C5/C6/
rm: cannot remove ‘C1/C2/C3/C4/C5/C6/’: Is a directory
[rrc@pridd ComandosDeLaTerminal]$ rm -d C1/C2/C3/C4/C5/C6/
[rrc@pridd ComandosDeLaTerminal]$ ls -al C1/C2/C3/C4/C5/C6/
ls: cannot access C1/C2/C3/C4/C5/C6/: No such file or directory
[rrc@pridd ComandosDeLaTerminal]$ touch C1/C2/C3/C4/C5/Archivo
[rrc@pridd ComandosDeLaTerminal]$ rm C1/C2/C3/C4/C5
rm: cannot remove ‘C1/C2/C3/C4/C5’: Is a directory
[rrc@pridd ComandosDeLaTerminal]$ rm -d C1/C2/C3/C4/C5
rm: cannot remove ‘C1/C2/C3/C4/C5’: Directory not empty
[rrc@pridd ComandosDeLaTerminal]$ rm -r C1/C2/C3/C4/C5
[rrc@pridd ComandosDeLaTerminal]$ ls -al C1/C2/C3/C4/C5
ls: cannot access C1/C2/C3/C4/C5: No such file or directory
[rrc@pridd ComandosDeLaTerminal]$ rm -df C1
rm: cannot remove ‘C1’: Directory not empty
rrc@pridd ComandosDeLaTerminal]$ rm -r C1
rm: descend into directory ‘C1’? y
rm: remove directory ‘C1/C2’? y
rm: remove directory ‘C1’? y
[rrc@pridd ComandosDeLaTerminal]$ ls -alR C11
C11:
total 12
drwxrwxrwx 3 rrc rrc 4096 Mar 22 16:06 ./
drwxrwxr-x 11 rrc rrc 4096 Apr 12 14:21 ../
drwxrwxrwx 3 rrc rrc 4096 Mar 22 16:06 C12/
C11/C12:
total 12
drwxrwxrwx 3 rrc rrc 4096 Mar 22 16:06 ./
drwxrwxrwx 3 rrc rrc 4096 Mar 22 16:06 ../
drwxr-x--- 2 rrc rrc 4096 Mar 22 16:06 C13/
C11/C12/C13:
total 8
drwxr-x--- 2 rrc rrc 4096 Mar 22 16:06 ./
drwxrwxrwx 3 rrc rrc 4096 Mar 22 16:06 ../
[rrc@pridd ComandosDeLaTerminal]$ rm -rf C11
[rrc@pridd ComandosDeLaTerminal]$ ls -alR C11
ls: cannot access C11: No such file or directory
[rrc@pridd ComandosDeLaTerminal]$ rm -rvf richard
removed ‘richard/evolution.es.html’
removed ‘richard/RichardSleeve.es.html’
removed ‘richard/robots.txt’
removed ‘richard/index.html’
removed ‘richard/images/valid-xhtml11.png’
removed ‘richard/images/valid-xhtml10.png’
removed directory: ‘richard/images’
removed ‘richard/evolution.html’
removed ‘richard/index.es.html’
removed ‘richard/RichardSleeve.html’
removed directory: ‘richard’
</syntaxhighlight>
[[Category:Comandos de la terminal]]