Quantcast
Channel: Hasen Judy
Viewing all articles
Browse latest Browse all 50

bash: mkdir + cd with one command

$
0
0

codedump:

function mkcd() {
  [ -n "$1" ] && mkdir -p "$@" && cd "$1";
}

Example:

user@host:~$ cd work
user@host:~/work$ mkcd website.com/{html,src,stuff}
user@host:~/work/website.com/html$

Viewing all articles
Browse latest Browse all 50

Trending Articles