Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

One command to create a directory and file inside it linux command

$ echo 'mkfile() { mkdir -p "$(dirname "$1")" && touch "$1" ;  }' >> ~/.bashrc
$ source ~/.bashrc
$ mkfile /your/directory/yourFile.txt
Comment

with which command make file and directory in linux

$ ls -FR thesis
chapter_1/

thesis/chapter_1:
section_1/

thesis/chapter_1/section_1:
subsection_1/

thesis/chapter_1/section_1/subsection_1:
Comment

how to create a directory and add files in linux on one line

mkdir B && touch B/myfile.txt
Comment

PREVIOUS NEXT
Code Example
Shell :: yarn install from package.json 
Shell :: install laravel globally ubuntu 
Shell :: linux show uid 
Shell :: ubuntu install times new roman font 
Shell :: git list remote branches 
Shell :: delete all files with specific name ubuntu 
Shell :: add a cookie to curl 
Shell :: how to remove v4l2loopback 
Shell :: linux remove last n lines from file 
Shell :: docker compose install debian 
Shell :: git commit changes to different branch 
Shell :: ecto migration 
Shell :: linux get dir of file 
Shell :: install rancher 
Shell :: is there any difference between git push and git push origin master 
Shell :: install pytorch lightning 
Shell :: ubuntu ram type 
Shell :: CMake Error: Could not find CMAKE_ROOT !!! 
Shell :: git code push 
Shell :: batch script delete files older than 30 days 
Shell :: git pull from another branch 
Shell :: yarn add @materialui 
Shell :: linux get user id 
Shell :: pip install bootstrap 
Shell :: src refspec main does not match any 
Shell :: git merge abort 
Shell :: scp folder 
Shell :: install pandas 
Shell :: grep find and show lines after 
Shell :: find file in linux with regex 
ADD CONTENT
Topic
Content
Source link
Name
8+8 =