Create complex directory structures and files in one command
Go to file
2023-09-25 17:35:54 +05:00
ff added -v option to list created files 2023-09-25 17:35:54 +05:00
README.md added -v option to list created files 2023-09-25 17:35:54 +05:00

Fast Files (ff)

Description

ff is a bash script which is a combination of 'mkdir' and 'touch'. It can create directory structures and files simultaneously and lists the created objects using eza, lsd, or ls.

Dependencies

  • bash
  • eza (optional)
  • lsd (optional)

Usage

  ff [path file or folder]
 --help : prints usage info
 -v     : prints created files

Examples

Single file

ff file
  file


Single directory

ff dir/
   dir

Multiple files

ff file1 file2 file3
  file1
  file2
  file3

Multiple directories

ff dir1/ dir2/ dir3/
   dir1
   dir2
   dir3

File in a directory

ff dir/file
  dir
└──   file

Directory in a directory

ff dir1/dir2/
  dir1
└──    dir2

Multiple files in multiple directories

ff dir1/dir2/file1 dir3/file2
  dir1
└──   dir2
   └──   file1
  dir3
└──   file2

If your shell supprts brace expansion e.g bash, zsh, fish

ff dir1/{dir2/{file1,file2}.txt,dir3/file3.txt}
  dir1
├──   dir2
│  ├──   file1.txt
│  └──   file2.txt
└──   dir3
   └──   file3.txt

Advanced New File