Giter VIP home page Giter VIP logo

mktouch's Introduction

mktouch

mktouch is a command-line tool for creating a file at a specified path and, if necessary, creating any parent directories that don't already exist.

Installation

To install mktouch, run the following command:

go install github.com/B3ns44d/mktouch@latest

Usage

To create an empty file at a specified path, run the following command:

mktouch <filename>

Replace <filename> with the path to the file you want to create.

By default, mktouch will create the file with read and write permissions for the owner, and read-only permissions for others. You can use the --mode flag to specify different permissions in octal format:

mktouch --mode 0640 <filename>

This will create the file with read and write permissions for the owner, and read-only permissions for the group.

You can also use the --parents or -p flag to create parent directories if they don't already exist:

mktouch -p /path/to/new/file

This will create the directories /path/to/new/ if they don't already exist, and then create the file file in the new/ directory.

You can create multiple files at once by passing in multiple filenames as arguments:

mktouch -p /path/to/new/{file.go,file1.go,file2.go}

This will create the files file.go, file1.go, and file2.go in the /path/to/new/ directory.

You can also use brace expansion to create a range of files:

mktouch -p /path/to/new/test{0001..0003}.go

This will create the files test0001.js, test0002.js, and test0003.js in the /path/to/new/ directory. Note that brace expansion is a feature of the shell, not the mktouch command itself, so you need to run these commands in a shell that supports brace expansion.

mktouch's People

Contributors

b3ns44d avatar

Stargazers

 avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.