0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

How to make file with touch without error on not existence deep directory ( we need like mkdir -p option )

0
Last updated at Posted at 2019-12-03

settiing

execute on your console bellow command
OR
register to ~/.zshrc ~/.bashrc

function touchp() { mkdir -p $(dirname "$1"); touch "$1"; }

execute

touchp ~/too/deep/dir/dir/dir/file.txt

Original by Github issue

チャットメンバー募集

何か質問、悩み事、相談などあればLINEオープンチャットもご利用ください。

Twitter

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?