Directorios
1. mkdir
El comando mkdir (make directory) permite crear directorios:
[willy]$ ls -l
total 12
drwxr-xr-x 2 willy tec 4096 jun 1 10:42 colores
drwxr-xr-x 2 willy tec 4096 jun 1 10:43 formas
-rw-r--r-- 1 willy tec 62 may 26 22:55 notas
[willy]$ mkdir flores
[willy]$ ls -l
total 16
drwxr-xr-x 2 willy tec 4096 jun 1 10:42 colores
drwxr-xr-x 2 willy tec 4096 jun 1 11:30 flores
drwxr-xr-x 2 willy tec 4096 jun 1 10:43 formas
-rw-r--r-- 1 willy tec 62 may 26 22:55 notas
Se pueden indicar varios argumentos en la línea de comandos:
[willy]$ ls
colores flores formas notas
[willy]$ mkdir nombres flores/alegres
[willy]$ ls . flores
.:
colores flores formas nombres notas
flores:
alegres
Hay que agregar la opción -p (padres) para crear una serie de directorios anidados:
[willy]$ mkdir -p estaciones/invierno/enero
[willy]$ ls -R
.:
colores flores formas nombres notas estaciones
./colores:
azul amarillo rojo
./flores:
alegres
./flores/alegres:
./formas:
círculo triángulo
./nombres:
./estaciones:
invierno
./estaciones/invierno:
enero
./estaciones/invierno/enero:
2. rmdir
rmdir (remove directory) permite borrar directorios. Como...