basename
v0.13.0
basename [-z] NOMBRE [SUFIJO]
basename OPCIÓN... NOMBRE...
Mostrar NOMBRE eliminando cualquier componente de directorio inicial Si se especifica, también eliminar un SUFIJO final
Options
--multiple,-a-
support multiple arguments and treat each as a NAME
--suffix=<SUFFIX>,-s <SUFFIX>-
remove a trailing SUFFIX; implies -a
--zero,-z-
end each output line with NUL, not newline
Examples
Imprime el nombre de un fichero a partir de su ruta:
basename {{ruta/al/archivo}}
Imprime el componente terminal de la ruta de un directorio:
basename {{ruta/al/directorio}}
Imprime el nombre de un fichero sin un sufijo:
basename {{ruta/al/archivo}} {{sufijo}}
The examples are provided by the tldr-pages project under the CC BY 4.0 License.
Please note that, as uutils is a work in progress, some examples might fail.