File - BaseName

Undraw File Manager Re Ms29

About

A file / directory is located by its path.

The base name is the last part of the path (ie the file name and its extension if any)

With the copy and move file operation, the basename does not change by default (ie if not specified).

Example

The basename for the the below path:

/dir1/dir2/name.extension

is

name.extension

Utility

The basename core utility returns the base name

basename /mydir/mysubdir/basename

would return basename





Discover More
Card Puncher Data Processing
CoreUtils

Corutils is a package of essential executable command line client (used greatly in shell script) Name Description arch Print machine hardware name. b2sum Print or check BLAKE2 digests. base32...
Card Puncher Data Processing
How to perform File System operations (copy, exists, move, ) in Ansible?

This page shows you how to perform File system operations in Ansible. When looping through files, you can get the...



Share this page:
Follow us:
Task Runner