-
Notifications
You must be signed in to change notification settings - Fork 0
/
Comandos_de_la_terminal%2Fmv.mw
139 lines (110 loc) · 5.82 KB
/
Comandos_de_la_terminal%2Fmv.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
__NOTOC__
* [[:#mv | mv]]
== mv ==
<syntaxhighlight lang="bash">
[rrc@Llawyr ComandosDeLaTerminal]# mv --help
Usage: mv [OPTION]... [-T] SOURCE DEST
or: mv [OPTION]... SOURCE... DIRECTORY
or: mv [OPTION]... -t DIRECTORY SOURCE...
Rename SOURCE to DEST, or move SOURCE(s) to DIRECTORY.
Mandatory arguments to long options are mandatory for short options too.
--backup[=CONTROL] make a backup of each existing destination file
-b like --backup but does not accept an argument
-f, --force do not prompt before overwriting
-i, --interactive prompt before overwrite
-n, --no-clobber do not overwrite an existing file
If you specify more than one of -i, -f, -n, only the final one takes effect.
--strip-trailing-slashes remove any trailing slashes from each SOURCE
argument
-S, --suffix=SUFFIX override the usual backup suffix
-t, --target-directory=DIRECTORY move all SOURCE arguments into DIRECTORY
-T, --no-target-directory treat DEST as a normal file
-u, --update move only when the SOURCE file is newer
than the destination file or when the
destination file is missing
-v, --verbose explain what is being done
--help display this help and exit
--version output version information and exit
The backup suffix is '~', unless set with --suffix or SIMPLE_BACKUP_SUFFIX.
The version control method may be selected via the --backup option or through
the VERSION_CONTROL environment variable. Here are the values:
none, off never make backups (even if --backup is given)
numbered, t make numbered backups
existing, nil numbered if numbered backups exist, simple otherwise
simple, never always make simple backups
Report mv bugs to [email protected]
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 'mv invocation'
[rrc@Llawyr ComandosDeLaTerminal]# mv --version
mv (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 Mike Parker, David MacKenzie, and Jim Meyering.
[rrc@Llawyr ComandosDeLaTerminal]# alias mv
alias mv='mv -i'
[rrc@Llawyr ComandosDeLaTerminal]# unalias mv
[rrc@Llawyr ComandosDeLaTerminal]# mv Archivo1 ArchivoMV1
[rrc@Llawyr ComandosDeLaTerminal]# ls -al ArchivoMV1
-rw------- 1 rrc rrc 24 Apr 4 14:35 ArchivoMV1
[rrc@Llawyr ComandosDeLaTerminal]# mv Archivo2 ArchivoMV1
[rrc@Llawyr ComandosDeLaTerminal]# ls -al ArchivoMV1
-rw-r--r-- 1 rrc rrc 0 Mar 27 13:27 ArchivoMV1
[rrc@Llawyr ComandosDeLaTerminal]# alias mv='mv -i'
[rrc@Llawyr ComandosDeLaTerminal]# mv SortFile ArchivoMV1
mv: overwrite ‘ArchivoMV1’? n
[rrc@Llawyr ComandosDeLaTerminal]# mv -f STDERRArchivo ArchivoMV1
[rrc@pridd ComandosDeLaTerminal]$ su -
Password:
[root@Llawyr ComandosDeLaTerminal]# mv /var/www/html/richard RichardMV
[root@Llawyr ComandosDeLaTerminal]# ls -al RichardMV/
total 72
drwxrwsr-x 3 rrc webmin 4096 Apr 4 15:16 ./
drwx------ 19 rrc rrc 4096 Apr 4 15:18 ../
-rw-r--r-- 1 root webmin 0 Apr 4 15:00 DelMe
-rw-r--r-- 1 root webmin 0 Apr 4 15:04 DelMe3
-rw-rw-r-- 1 rrc webmin 3320 Jun 25 2008 evolution.es.html
-rw-rw-r-- 1 rrc webmin 3272 Jun 25 2008 evolution.html
drwxrwsr-x 2 rrc webmin 4096 Jul 8 2008 images/
-rw-rw-r-- 1 rrc webmin 14700 Jul 10 2008 index.es.html
-rw-rw-r-- 1 rrc webmin 13242 Jun 25 2008 index.html
-rw-rw-r-- 1 rrc webmin 4329 Jun 25 2008 RichardSleeve.es.html
-rw-rw-r-- 1 rrc webmin 4328 Jun 25 2008 RichardSleeve.html
-rw-rw-r-- 1 rrc webmin 489 Jun 20 2013 robots.txt
[root@Llawyr ComandosDeLaTerminal]# mv -bu /var/www/html/richard RichardMV
mv: cannot stat ‘/var/www/html/richard’: No such file or directory
[root@Llawyr ComandosDeLaTerminal]# mv -bu RichardMV /var/www/html/richard
[root@Llawyr ComandosDeLaTerminal]# ls -al /var/www/html/richard
total 72
drwxrwsr-x 3 rrc webmin 4096 Apr 4 15:16 ./
drwxr-xr-x 20 root root 4096 Apr 4 15:19 ../
-rw-r--r-- 1 root webmin 0 Apr 4 15:00 DelMe
-rw-r--r-- 1 root webmin 0 Apr 4 15:04 DelMe3
-rw-rw-r-- 1 rrc webmin 3320 Jun 25 2008 evolution.es.html
-rw-rw-r-- 1 rrc webmin 3272 Jun 25 2008 evolution.html
drwxrwsr-x 2 rrc webmin 4096 Jul 8 2008 images/
-rw-rw-r-- 1 rrc webmin 14700 Jul 10 2008 index.es.html
-rw-rw-r-- 1 rrc webmin 13242 Jun 25 2008 index.html
-rw-rw-r-- 1 rrc webmin 4329 Jun 25 2008 RichardSleeve.es.html
-rw-rw-r-- 1 rrc webmin 4328 Jun 25 2008 RichardSleeve.html
-rw-rw-r-- 1 rrc webmin 489 Jun 20 2013 robots.txt
[root@pridd ComandosDeLaTerminal]# touch /var/www/html/richard/DelMe
[root@Llawyr ComandosDeLaTerminal]# mv -bu /var/www/html/richard/DelMe* .
[root@Llawyr ComandosDeLaTerminal]# ls -al /var/www/html/richard
total 72
drwxrwsr-x 3 rrc webmin 4096 Apr 4 15:20 ./
drwxr-xr-x 20 root root 4096 Apr 4 15:19 ../
-rw-rw-r-- 1 rrc webmin 3320 Jun 25 2008 evolution.es.html
-rw-rw-r-- 1 rrc webmin 3272 Jun 25 2008 evolution.html
drwxrwsr-x 2 rrc webmin 4096 Jul 8 2008 images/
-rw-rw-r-- 1 rrc webmin 14700 Jul 10 2008 index.es.html
-rw-rw-r-- 1 rrc webmin 13242 Jun 25 2008 index.html
-rw-rw-r-- 1 rrc webmin 4329 Jun 25 2008 RichardSleeve.es.html
-rw-rw-r-- 1 rrc webmin 4328 Jun 25 2008 RichardSleeve.html
-rw-rw-r-- 1 rrc webmin 489 Jun 20 2013 robots.txt
[root@Llawyr ComandosDeLaTerminal]# ls -al DelMe*
-rw-r--r-- 1 root webmin 0 Apr 4 15:00 DelMe
</syntaxhighlight>
[[Category:Comandos de la terminal]]