touchp logo

touchp

Recursively create directories and files in a single command

touchp screenshot 1
Overview

What is touchp?

touchp is a command-line utility written in Go that recursively creates directories and target files in a single command. It combines the functionality of mkdir -p and touch, making it easy to create files along with their parent directories. It supports multiple file creation, customizable permissions, and initial content.

How to use touchp

Once installed, you can use touchp with the syntax: touchp [options] path/to/filename. Options include -f to force overwrite, -c to specify initial content, and -m to set file permission mode.

Core features

  1. 01Recursively create directories and files with one command
  2. 02Support for multiple file creation in a single invocation
  3. 03Customizable file permissions (e.g., 0644, 0600)
  4. 04Option to specify initial content for the files
  5. 05Cross-platform compatibility (macOS, Linux, Windows)

Use cases

  • Creating a directory structure with files in one command
  • Setting custom permissions for newly created files
  • Initializing files with specific content during creation

Who makes touchp

Touchp is developed by Bin Hua, who has created this utility to simplify the process of creating directories and files in a command-line environment.

Frequently asked questions

What is touchp?

Touchp is a command-line utility that allows users to recursively create directories and files in a single command.

How do I install touchp?

You can install touchp using a provided installation script that detects your OS and downloads the appropriate binary.

What operating systems are supported?

Touchp supports macOS, Linux, and Windows.

Can I specify initial content for the files?

Yes, you can use the -c option to specify initial content for the files being created.

What should I do if I encounter a 'Permission Denied' error?

If /usr/local/bin is not writable, the script installs to /bin. You can add it to your PATH with 'export PATH=$PATH:/bin'.

Is touchp cross-platform?

Yes, touchp is compatible with macOS, Linux, and Windows.

How can I see the help message for touchp?

You can run 'touchp help' to display the help message.

Alternatives

touchp alternatives worth a look.

Productivity →

Related guides

All guides →