Difference between revisions of "Dirname"
Jump to navigation
Jump to search
Line 2: | Line 2: | ||
<code>dirname</code> command included in <code>[[coreutils]]</code> package. | <code>dirname</code> command included in <code>[[coreutils]]</code> package. | ||
* https://man7.org/linux/man-pages/man1/dirname.1.html | * https://man7.org/linux/man-pages/man1/dirname.1.html | ||
+ | |||
+ | [[cd]] -- "$(dirname "$0")" | ||
== Related terms == | == Related terms == |
Revision as of 13:43, 28 February 2022
dirname
command included in coreutils
package.
cd -- "$(dirname "$0")"
Related terms
PATH
environment variablemkdir -p
mkdir -p "$(dirname "$1")" && touch "$1"
See also
- Coreutils,
tail
,dirname
,env
,sleep
,install, truncate
Bash [ -c ]
,alias
,&&
, Bash history, Autocompletion,set
,unset
,export
,.bash_aliases, .bashrc and .bash profile
,PS1
,echo
,brace expansion
, Function,shopt
,trap
,set -e
,source
,PATH
,complete
,disown
,.hushlogin
,.bashrc
,builtin
,eval
,set
,$PATH
,$HOME
,TZ
,.profile
,-e, -i
,Builtin (Bash)
,mapfile
,~
, return (Bash), for, until,declare, dirname, basename, functions.sh
, Bash arithmetic expansion,shift, bash --rcfile, readonly, $1, $@
Advertising: